Open sanzog03 opened 4 years ago
Having the same issue. We haven't found a solution yet. If we do, we will share it here. It seems that 5 services (where it was creating 5 connections before), it now creates above 100's of connections. Had any luck solving this yourself?
I found some problem with the reconnection strategy that this library uses. i.e.
when a client (using this library) faces a network connection issue, the auto reconnection startegy feature kicks in. A connection with explicit consumer tag couldn't even reconnect to the amqp server. I couldn't exactly replicate - with steps - the increasing amqp connections, but i saw the problem occuring only after network instability in the client devices.
Also to mention, when the amqp server restarted after not being able to handle too much connections, the reconnection strategy could not make client connect to the restarted amqp server.
In the mean time i came across amqplib
library and becase of this problem i changed the whole amqp library of the production application i was working on with amqplib
and handled the reconnection startegy by myself. So the library change (amqplib) and custom reconnection strategy has fixed the issue on my application.
I don't exactly know how but very often i see the tcp connection to the rabbitmq server keeps incresing gradually. The increasing connection is quite problematic as it floods the rabbitmq server where the live connection gets blocked. When the connection increases i can see the following logs porduced by amqp-ts in client application:
i.e. there seems to appear
IllegalOperationError: Channel closed
along withQueueDeclare; 405 (RESOURCE-LOCKED)
unhandled rejection errors. In addition to that there is no exact steps to recreate the issue as of now, but this issue is arising quite often.