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
blpop will not receive any data if the key empty for a long time and then pushed a data #1199
Comments
Sounds like something on your network is killing the idle connection. And unfortunately the health check improvements in 3.3.x won't work in this case because we cannot send a health check in the middle of a blocking statement. However you could pass a timeout to BRPOP. You'd just need to account for BRPOP returning |
Thanks for your reply. So, if I pass a timeout, such as 5 minutes, and then, if I receive the data in 5 minutes, I parse it. if I don't, I parse the timeout logic, and then blpop again. |
If you call |
Got similar issue. I am using redis-py to get the keys from a remote redis server (over internet). I am using the code like:
If the queue is empty, activity idle, without the timeout param, the process becomes dead (db.blpop never returned) after about 20 minutes. |
@captainst this seems like a separate issue. If you want to open another issue with details including your redis-py version and connection string I can take a look. |
@andymccurdy Thank you for the fast reply. I'll do it. |
Version: What redis-py and what redis version is the issue happening on?
Platform: What platform / version? (For example Python 3.5.1 on Windows 7 / Ubuntu 15.10 / Azure)
Description: Description of your issue, stack traces from errors and code that reproduces the issue
this code will work normally when I launch it just now. but if the list keeps empty for a long time, for example, 2 days, and then I push a data to it. this code will still blocked at
data = client.blpop('key')[1]
,could not receive any data. only after I terminal the process and relaunch it again, it can receive the new data.The text was updated successfully, but these errors were encountered: