Lots of new connection + COMMAND to slaves in Redis Cluster
See original GitHub issueBug Report
Current Behavior
In the current Redis Cluster setup with 3 masters and 3 slaves, my java daemon is reconnecting to one of the slaves continuously. When performing a tcpdump
, I constantly see a new connection being opened, a COMMAND
being sent, then the connection closes again (the TCP FIN is initiated by the client).
Input Code
We’re just using Spring Boot 2.0.0 with Lettuce to connect to Redis. This seems to be done by the library, since I don’t have specific code here. Just using the RedisTemplates in a few places.
Expected behavior/code
I expected that the slaves are connected to once to get the cluster information and maybe a single connection to keep checking the status. I have no idea why it keeps opening and closing connections.
Environment
- Lettuce version(s): 5.0.2
- Redis version: 3.2.10
Additional context
We are using a lot of connections on a busy server. I’m not able to reproduce it locally when not performing a lot of actions.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
minIdle, maxIdle and maxActive are the numbers of logical connections. A Lettuce Cluster connection consists itself then of multiple physical connections:
Consider:
(number of nodes n x 2) + 1
That’s the total maximum of physical connections that are bundled under a logical connection.
Closing this ticket as the issue is solved externally.
hi @marcdejonge what config (and properties) did you use to get around of this issue? We have seen the same problem now and updating versions doesn’t help either.