-
-
Notifications
You must be signed in to change notification settings - Fork 930
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
Redeliver same tasks repeatedly with redis broker and gevent #1098
Comments
@wuqiallen I will ask that you also try this with the master branch of kombu in place of 4.6.4 -- I did a bunch of work with Redis recently that was merged: https://github.com/celery/kombu/pull/1089/files While your issue report may be different, we need to know if it is still an issue for you on the master branch as we are prepping for a soon release. If we know it is still an issue than a possible fix may be discovered. |
Also try master celery branch with that please, or at least latest. Also for what its worth latest redis on pypi is redis==3.3.8 |
@matteius Thanks for your reply. I will try to reproduce this issue with the env which you talked me. I will let you know the results as soon as I can. |
This still reproduces on latest versions, as the relevant code is still there: kombu/kombu/transport/redis.py Lines 197 to 199 in b51d1d6
Whenever In our case, we don't even use |
Can confirm @arikfr 's statement that we are still seeing this problem on 3rd feb 2019 as the code in question is still present. |
@deepanjan-nsk we ended up patching this in our codebase (and later replacing Celery with RQ). If you want I can try and find the patch. |
Thanks @arikfr, We ended up doing the same w.r.t. a patch in our codebase. |
Also, we do a patch to remove |
celery==4.4.*? |
I had reproduced this with celery==4.4.0 and kombu==4.6.7. Actually, it seems like a kombu's issue instead of celery. |
try celery==4.4.2 and report again please |
replace |
it`s necessary to remind that make a HTTP request cautious when use |
fixed on #1259 |
Hi,
kombu==4.6.4
celery==4.3.0
redis==3.2.1
The visibility_timeout is ignored when using redis broker and gevent. As the result, when launching multiple workers with redis broker and gevent, the tasks will be re-delivered repeatedly.
Maybe the reason is #905.
When env==gevent, ceil will be changed to time() from time() - self.visibility_timeout.
As a result, all the tasks even the newly added ones in unacked set will be fetched out into visible, and then re-delivered by calling restore_by_tag, ignoring the functionality of visibility_timeout. The function restore_visible in QoS is called by maybe_restore_messages
But the function maybe_restore_messages is further called by other methods multiple times. Particularly in register_with_event_loop, where maybe_restore_messages is called every 10 seconds.
So when launching multiple workers with redis broker and gevent will re-deliver all tasks in unacked set repeatedly.
The text was updated successfully, but these errors were encountered: