-
-
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
SQS - Failure to restore unacked messages #1835
Comments
The patch I've done that makes it work as expected is:
|
I think this is a similar issue to what we're seeing, but we see that during a cold shutdown. Our scenario is:
Relevant settings:
From my investigation it seems to be caused by a race condition that happens because of the long polling and/or multiple workers ( Work-arounds I've found:
I think this could be easily prevented by adjusting the value in the Obviously, a better solution would be to restore the messages after all workers under the master process finish/stop their Possibly related to: celery/celery#8583
|
Potentially fixed with celery/celery#9213 (although it’s in Celery, not Kombu) @YahelOpp |
Celery v5.5.0b3 released. |
Versions:
After seeing messages stuck in
NotVisible
state at our production queues, I've set out to verify the warm shutdown mechanism works properly. My test setup:What I see happens:
received
)NotVisible
stateWarm shutdown
NotVisible
stateExpected behavior: the message should move to
Visible
state.A possible explanation I've found:
By manually changing the code in
kombu/transport/SQS.py
at the_put
function in the casemessage.get('redelivered')
, adding a duplicate call tochange_message_visibility
- the problem seemed to go away. I've tested this against real live SQS and against Localstack. In both the problem was consistent and solved once I added the duplicate call.To sum up, the problem might be on boto3's side and not in kombu, but I'm unsure about this.
I will be happy to assist and make a PR / provide a simple testing scenario.
Thanks
The text was updated successfully, but these errors were encountered: