-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Specify connection timeout for blocking calls #426
Comments
This is supported already |
I kindly suggest that until the call to "client.setTimeoutInfinite()" in https://github.com/xetorthio/jedis/blob/master/src/main/java/redis/clients/jedis/Jedis.java is gone, this issue is not resolved. If you do a quick search, you'll find that the following methods contain it:
|
Thanks for reopening this issue - We currently are working on a local fix. I could possibly do a PR for you to review. Let me know. |
I have forked jedis and made this change to support socket timeout - can you please check and let me know if you have any comments? |
On a forced outage of redis server, our team also encountered this problem. |
I bump into this problem today while doing some code reviewing on our codebase.
It cripples our connection mechanism, if master is hard rebooted, the subscription thread will block forever, we're not able to switch to the newly-elected master by leveraging |
In some scenarios the TCP connection in blocking calls like brpop, blpop and brpoplpush gets stalled (netstat shows it as ESTABLISHED on the client side, but gone on the server side). In this case it would be beneficial to be able to specify a connection timeout, but blocking calls set it to infinite. I know that it's necessary in issue #108, but it should be possible to be able to set this timeout at least for calls that specify a timeout.
I suggest that for calls that specify a timeout this value (or a slightly larger one) is set for the connection timeout as well.
The text was updated successfully, but these errors were encountered: