Replies: 1 comment
-
I'm not sure what "EPS" means. What is logged by RabbitMQ when disconnect happens?
There may be something in your code that is blocking Pika's ability to send heartbeats. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys,
I found a similar question bit it was related to a much older version of pika.
Moreover, I think the issue lies within AMQP server itself and/or my network configuration, as I tried both Pika and aio-pika in the same place (afaik, aio-pika is not related to Pika since 5.x).
Setup:
There is a remote RabbitMQ server (>75 ms ping). It hosts three exchanges with queues bound to them, with several EPS (e.g. 11-13 EPS for the first one, 1-2 EPS for two others). One of "slow" queues is used for shorter messages (e.g. 200-300 bytes JSON in payload), two others receive larger ones (3..6 KB).
Problem: if I connect to a queue where messages of 200 bytes arrive, the connection is fine, disconnect happens instantly (
Channel 1 was closed: (0, 'Normal shutdown')
).If I change the queue to another, where payloads of 4-6 KB arrive, I get error Channel 1 was closed: No activity or too many missed heartbeats in the last 60 seconds (with default connection string) after 2 minutes of inactivity.
Alternatively, if I run the consumer script and try to terminate it after 5 seconds (^C), instead of instant disconnect,
Sending a Basic.Cancel RPC command to RabbitMQ
does not result in acknowledging the disconnect request, Connection is closing or already closed arrives in 2*heartbeat seconds.To make things more complicated, the setup with aio-pika client has worked flawlessly (with several messages missed per day) for half a year. Network setup seems to have been changed, but I have no control over it unfortunately (it's managed by the company, I only can make request for changes). Of course, if I make a similar setup on another network, no such issues occur.
What connection settings may be tuned?
Beta Was this translation helpful? Give feedback.
All reactions