pika: Connection unexpectedly stuck when consuming.

Hi there. I’m an author of aio-pika library. Few days ago @eldardamari create an issue #54.

The consuming unexpectedly stops, after that rabbitmq kills the connection after heartbeat timeout.

10.248.24.41: =ERROR REPORT==== 7-Sep-2017::14:51:05 ===
10.248.24.41: closing AMQP connection <0.26023.456> (10.248.24.27:37536 -> 10.248.24.41:5672):
10.248.24.41: missed heartbeats from client, timeout: 60s

After some investigation I trying to switch to the pika-0.10 and it helped.

Now I reverted pika-0.10 to the requirements.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 5
  • Comments: 15 (10 by maintainers)

Most upvoted comments

Exactly this issue happened to me recently. I’ll try to post some code when i’m be able to reproduce it with a simple snippet.

Scenario:

  • Several processes pubish in queue1.
  • ProcessX listen from queue1, does some stuff and publish to queue2.
  • ProcessX use a Threadpool to execute the function that process every message received. Just after this call, ProcessX acks this message (channel.basic_ack).
  • The function that process the message, at the end, publish another message in queue2.

When using Pika 0.10.0 all work fine. When I upgrade to pika 0.11.0 the issue opened by @mosquito happened.

Solution 1: Remove threadpool and process the message in the same thread/process Solution 2: Remove ack. I don’t need ack messages. Solution 3: Keep using pika 0.10.0