JedisConnection - Socket not closed properly when redis.quit command fails
Hi,
When a host is unreachable or read timeouts are encountered, the JedisConnection.close() method doesn't ensure that the socket is properly closed :
@Override
public void close() {
jedisClient.quit();
jedisClient.disconnect();
}
I.e, the jedisClient.disconnect() is never called if the jedisClient.quit() fails.
Under heavy load, the number of TCP connections in ESTABLISHED state can go beyond the configured connection pool size (MaxConnsPerHost).
@rprevot we are experiencing similar issues especially when we have abrupt issues on one or more Dynomite nodes in the cluster. Restarting the clients once the Dynomite becomes healthy brings the connections to a normal state (within the configured #max pool size). The fix you have suggested is still in the open state. Do the changes you suggested solve the problem in your environment?