0

We are getting below error when trying to send message to RabbitMQ. Our application is on .net core 3.0 on linux VM, and the RMQ server is running in a cluster of two on linux VMs. The issue is intermittent and not happening always.

Already closed: The AMQP operation was interrupted: AMQP close-reason, initiated by Library, code=541, 
text='Unexpected Exception', classId=0, methodId=0, cause=System.Net.Sockets.SocketException (110): 
Connection timed out
   at RabbitMQ.Client.Impl.InboundFrame.ReadFrom(NetworkBinaryReader reader)
   at RabbitMQ.Client.Framing.Impl.Connection.MainLoopIteration()
   at RabbitMQ.Client.Framing.Impl.Connection.MainLoop()

We have enabled automatic recovery by setting AutomaticRecoveryEnabled to true, and other than that every setting is default one.

Nitin Jain
  • 289
  • 2
  • 9
  • I have encountered similar error when the an unhandled exception occurs on the producer or consumer thread and it crashes the process thus aborting the operation. try to add more error handling and logging in your application code to try and determine the error – Jonathan Busuttil Feb 26 '20 at 08:46
  • It seems to be clearly a connection issue in RabbitMQ driver. We already have the logging that's why we have zeroed to this message. We need to understand if there is any workaround or fix of this issue, by changing any config or anything. The VMs are in cloud with fault tolerance, so it is less likely that there would be any network issue. To me it seems to be some kind of idle timeout issue or something similar. – Nitin Jain Feb 26 '20 at 10:20
  • hey, any news on this? did you manage to solve the issue? – Aranha Aug 31 '20 at 12:23
  • 1
    @Aranha We did two things 1. Used _channel.ConfirmSelect(); & _channel.WaitForConfirms(); to apply a retry logic. 2. Changed _factory.RequestedHeartbeat to 15 seconds. Didn't get the issue since we have applied these two things, though not sure which one is helping out :) – Nitin Jain Sep 01 '20 at 13:32

0 Answers0