CPU intensive controller prevents AMQP connection from receiving heartbeat, hence connections gets closed.
ticmaidev opened this issue · comments
ticmaidev commented
I've reported this issue on NestJS, so here's the link for reference (includes minimum reproduction code):
Stephen Cresswell commented
Hi @ticmaidev
This is a consequence / limitation of the Node.js architecture. If you have a long running synchronous task, or you flood the event loop with a high number of asynchronous ones, new tasks may not be executed for quite some time.
In the case of amqplib, this means that it may neither be able to send nor receive heartbeats, and may either close the connection, or have it closed by the broker.
You options are to
ticmaidev commented
THANK YOU