[rabbitmq-discuss] .NET client: intermittent AlreadyClosedException - connected host has failed to respond
Andrei Volkov
zvolkov at gmail.com
Tue Nov 27 17:32:10 GMT 2012
Hi, I'm using .NET client 2.8.7 on Windows. Getting intermittent timeouts
when trying to publish a message. The stack trace is below.
I do NOT think this problem is probabilistic in nature, meaning it does NOT
happen to a percentage of the attempts.
Instead, there seems to be a condition emerging which causes this. As the
library I use on top of RabbitMQ .NET client (MassTransit) knows how to
retry on failure, most of these do not cause disruptions, but if the
condition window sometimes stays open long enough to exceed the number of
retries, then it becomes noticeable to the user.
I think (but not sure) it seems to happen after a period of inactivity,
after the connection has been open but idle for a while.
This seems to only happen when the connection crosses the DMZ boundary, so
the NAT factor may be involved. Also, I run on virtualized hardware at
Rackspace, so this may be an additional factor.
Did anybody experience this and has any suggestions on how I could
troubleshoot / identify / workaround the issue?
RabbitMQ.Client.Exceptions.AlreadyClosedException: The AMQP operation was
interrupted: AMQP close-reason, initiated by Library, code=0, text="Socket
exception", classId=0, methodId=0, cause=System.Net.Sockets.SocketException
(0x80004005): A connection attempt failed because the connected party did
not properly respond after a period of time, or established connection
failed because connected host has failed to respond
at RabbitMQ.Client.Impl.Frame.ReadFrom(NetworkBinaryReader reader)
at RabbitMQ.Client.Impl.SocketFrameHandler_0_9.ReadFrame()
at RabbitMQ.Client.Impl.ConnectionBase.MainLoopIteration()
at RabbitMQ.Client.Impl.ConnectionBase.MainLoop()
at RabbitMQ.Client.Impl.SessionBase.Transmit(Command cmd)
at RabbitMQ.Client.Impl.ModelBase.ModelSend(MethodBase method,
ContentHeaderBase header, Byte[] body)
at RabbitMQ.Client.Impl.ModelBase.BasicPublish(String exchange, String
routingKey, Boolean mandatory, Boolean immediate, IBasicProperties
basicProperties, Byte[] body)
at RabbitMQ.Client.Impl.ModelBase.BasicPublish(String exchange, String
routingKey, IBasicProperties basicProperties, Byte[] body)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121127/a29e1802/attachment.htm>
More information about the rabbitmq-discuss
mailing list