question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connection Leak in Cluster Topology Refresh

See original GitHub issue

We are using Lettuce 5.0.2 to connect to a Redis cluster (Elasticache and Azure) with SSL enabled. We notice that once we enable periodic topology refresh the number of open connections to the cluster steadily increases.

We can reproduce the issue with a simple and pure Lettuce application which does nothing but periodic topology refreshes. The issue is also reproducible with SSL disabled.

The root cause of the issue seems to lie in the io.lettuce.core.cluster.topology.Connections#drainConnections method which mixes a local variable and an instance variable in an unintended way.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mp911decommented, Mar 6, 2018

That’s fixed now in snapshot builds of Lettuce 5.0.3 and 5.1.0.

0reactions
mp911decommented, Nov 12, 2019

The most recent version is 5.2.1. Can you retest and file a ticket if the problem persists?

Read more comments on GitHub >

github_iconTop Results From Across the Web

LettuceDriver on Twitter: "Lettuce 5.3.3.RELEASE is out now. Fixes a ...
Lettuce 5.3.3.RELEASE is out now. Fixes a connection leak in cluster topology refresh. Grab it while hot! https://groups.google.com/g/lettuce-redis-client-users ...
Read more >
Lettuce Reference Guide
Cluster topology refresh is now non-blocking. ... Set of connections for cluster topology refresh (a connection to each cluster node) ...
Read more >
lettuce-io/Lobby - Gitter
I want to retry the command x times while after each fail I retry reconnect or reparation (only way I could force cluster...
Read more >
Connections - VMware Docs
A connection leak on monitoring charts can be identified as a monotonically growing number of client connections. ... If the number of sockets...
Read more >
Goroutine leak in driver? Ever-increasing connection and ...
readWireMessage+0x206 /actions-runner-1467fb14/_work/go/pkg/mod/go.mongodb.org/mongo-driver@v1.8.4/x/mongo/driver/topology/connection.go:417 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found