Skip to content
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

Cannot apply recoverability policies when handler execution exceeds consumer ACK timeout leading to infinite message processing #927

Closed
bording opened this issue Jan 19, 2022 · 2 comments · Fixed by #1096 or #1071
Labels

Comments

@bording
Copy link
Member

bording commented Jan 19, 2022

While #894 fixed the transport's connection recovery problems around the newly introduced consumer acknowledgement timeout, there is still a related problem.

Symptoms

When a handler runs longer than the timeout value, the message is requeued by the broker and the transport logs a warning but is unable to ACK the message due to the timeout. When this happens, the message will be retried until the handler completes quicker than the timeout. No configured recoverability policies will apply. In the extreme case when handler execution always takes longer than the timeout, the message undergoes infinite retries.

Who's affected

Affected are used who either:

  • Have message handlers that always take long (by default more than 30 minutes) to execute. These messages undergo infinite retry attempts unless subsequent executions (after the first one) take less time. Customers who use the Outbox should are not affected because the second attempt bypasses the handler execution
  • Have messages that fail due to a persistent issue (e.g. bug in code) and the handler execution time before the exception is raised multiplied by the number of immediate retries is higher than 30 minutes. Such messages undergo infinite retries causing constant resource pressure on the system

Root cause

RabbitMQ broker introduced the ACK timeout after which a message cannot be ACKed by the client.

Workaround

A temporary workaround for the issue, if you are affected and can't upgrade immediately, is to extend the consumer timeout value.

Backported to

@bording bording added the bug label Jan 19, 2022
@SzymonPobiega SzymonPobiega changed the title Transport cannot apply recoverability policies when handler execution exceeds consumer ack timeout Transport cannot apply recoverability policies when handler execution exceeds consumer ACK timeout leading to infinite message processing Sep 20, 2022
@SzymonPobiega SzymonPobiega changed the title Transport cannot apply recoverability policies when handler execution exceeds consumer ACK timeout leading to infinite message processing Cannot apply recoverability policies when handler execution exceeds consumer ACK timeout leading to infinite message processing Sep 20, 2022
@bording
Copy link
Member Author

bording commented Sep 22, 2022

Fixed by #1071 and #1096

@bonieckimarcin
Copy link

bonieckimarcin commented Jun 16, 2023

I think we have found an issue #1259 related to fixes made in #1096 or #1071

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants