RabbitMQ ack timeout error when auto_ack=False

Viewed 1569

I am using Twisted's RabbitMQ consumer as detailed here. I have a simple web-crawler (scrapy, also based on Twisted) wherein I consume URLs to be crawled from a RabbitMQ queue, and once the crawled data is processed (successfully or otherwise), I send an acknowledgment back and re-queue the requests (I am using the delayed message plugin so that URLs are not re-crawled immediately, but only after specified time delta).

It takes no more than a minute to process the crawled data (at the worst). I am running the crawler on a single CPU, single-threaded program. I am aware of RabbitMQ's heartbeat logic, hence I have set hearbeat=0 in pika.ConnectionParameters.

However, after about an hour of crawling, I get the following error:

rabbitmq_1  | 2021-05-10 13:57:14.448 [warning] <0.1576.0> Consumer ctag1.9daa292d7d304072836de1e3f2dc540e on channel 1 has timed out waiting on consumer acknowledgement. Timeout used: 900000 ms
rabbitmq_1  | 2021-05-10 13:57:14.654 [error] <0.1576.0> Channel error on connection <0.1569.0> (172.18.0.4:52344 -> 172.18.0.2:5672, vhost: '/', user: 'guest'), channel 1:
rabbitmq_1  | operation none caused a channel exception precondition_failed: consumer ack timed out on channel 1
scrapy_1    | 2021-05-10 13:57:15 [pika.channel] WARNING: Received remote Channel.Close (406): 'PRECONDITION_FAILED - consumer ack timed out on channel 1' on <Channel number=1 OPEN conn=<pika.adapters.twisted_connection._TwistedConnectionAdapter object at 0x7f010f9b8b80>>

The error says some ack timed out after 90000ms of the timeout, however, I receive this error after an hour of processing.

Any clues?

0 Answers
Related