-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Blocking command timeout
cannot exceed client's socket_timeout
#2807
Labels
Comments
This was referenced Oct 15, 2023
This issue is marked stale. It will be closed in 30 days if it is not updated. |
Please don't close. We are experiencing this same issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version: What redis-py and what redis version is the issue happening on?
4.5.5
6.2.12
Platform: What platform / version? (For example Python 3.5.1 on Windows 7 / Ubuntu 15.10 / Azure)
3.10.11
, insidepython:3.10
docker imageDescription: Description of your issue, stack traces from errors and code that reproduces the issue
It seems that the
timeout
parameter to various blocking calls (specifically.brpop()
in my case) cannot be longer thansocket_timeout
, otherwise aredis.exceptions.TimeoutError
will be raised.NOTE: My application actually uses
redis.asyncio.client.Redis
, but this behavior can be reproduced with the sync client too, as shown below.Am I incorrect in thinking these timeouts should be more independent?... i.e: The socket timeout is "low-level", and the
BRPOP
timeout is "application-level"... regardless of what happens at the socket layer, theBRPOP
timeout requested should be honored.At present, the "If timeout is 0, then block indefinitely." statement in the docs appears to be untrue, because at some point you'll hit the socket timeout and get an exception that needs to be handled - which can also be demonstrated below by swapping for
r.brpop('my_key', timeout=0)
.The text was updated successfully, but these errors were encountered: