-
Notifications
You must be signed in to change notification settings - Fork 61
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
Python core dump or memcached/redis I/O error can cause other-process apply_async
to loop for thundering_herd_timeout
#66
Comments
I think this is actually #9. I'm going to write up a potential solution to this problem on that issue, based on our discussion. |
This is actually different from #9. I was wrong. Because of the way we do lock.acquire in both memcached and redis with no timeout possibility, if for some reason the lock.release doesn't happen in another thread/process, the lock aquisition will wait forever. I think that's probably low impact, since it would require the python code to have core dumped or the call to |
apply_async
to loop for thundering_herd_timeout
Probably the behavior we want is for those other processes to fail very quickly if they're stuck waiting for a lock. This timeout is more about how long you would expect it to take for a process to run through the |
I created #68 to document how I think a feature might look to do simultaneous execution prevention. |
See here: https://github.com/PolicyStat/jobtastic/blob/master/jobtastic/cache/base.py#L91
The
timeout
doesn't mean thatadd
will block and wait. It just means that if the key can be set, it will be set with that timeout. So if the key already exists, this results in a busy loop.The text was updated successfully, but these errors were encountered: