-
Notifications
You must be signed in to change notification settings - Fork 65
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
Feature request - read timeout is useless #94
Comments
Hi, I would argue that we should be clear in the documentation about this case. Implementation of suggested logic would require some magic of $CLIENT_TIMEOUT + $BLPOP_TIMEOUT which usually not a great idea and error prone. |
issue #89 is related to this one |
maybe, yes, I agree. but anyway, I think there should be way to specify different timeouts. like maybe mutators
or dynamic variables
or maybe just |
or maybe a syntax sugar like this.
vs
|
I agree, we should make it possible to set the 2 kinds of timeouts. From what you suggested, I prefer this one:
It's simple to understand, and general enough to require less coding, I think. |
read_timeout should be used to detect that something nastly is happened with Redis and display proper error message as soon as posisble.
for example we might use
GET with timeout 2 sec
and SET with timeout 2 sec
in case 2 sec is maximum deadline for our server/load.
However blocking commands are different. They have server timeout as well.
So BLPOP with server timeout 10 sec and client read_timeout 2 secs won't work.
Thus we need use timeout $CLIENT_TIMEOUT=2 sec for GET/SET/etc, unblocking.
and timeout $CLIENT_TIMEOUT + $BLPOP_TIMEOUT with BLPOP somekey, $BLPOP_TIMEOUT.
we have now to use different connections.
ie. would be good to have different timeout settings for blocking and non-blocking commands or to auto-adjust timeouts for blocking commands with server timeout.
The text was updated successfully, but these errors were encountered: