Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JedisConnection - Socket not closed properly when redis.quit command fails #292

Open
rprevot opened this issue Apr 12, 2020 · 1 comment

Comments

@rprevot
Copy link
Contributor

rprevot commented Apr 12, 2020

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).

@murthy-chelankuri
Copy link

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants