Before you spend too much time on this, I think I found the problem.�Posting it here for the benefit of future strugglers.<div><br><div>It looks like a TCP port�exhaustion�on the client side.</div><div>What happens is, unlike our main app, our healthcheck page opens (and closes) a new connection every time it is hit. The healthcheck page is hit every 5 seconds. By default on Windows the ephemeral TCP port can&#39;t be reused until after 240 seconds after it&#39;s closed. Hence the port exhaustion.</div>

<div><br>Cheers.<br><br><div class="gmail_quote">On Thu, Nov 29, 2012 at 11:37 AM, Andrei Volkov <span dir="ltr">&lt;<a href="mailto:zvolkov@gmail.com" target="_blank">zvolkov@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Emile!�<div><br></div><div>We do have the hearbeat enabled, and set to 5 seconds. According to traces it is�actually�happening every 2 to 4 seconds. Rackspace have confirmed the network hardware is configured to drop idle connections after one hour. This should not be an issue then.<div>


<br></div><div>We also see a large number of connections opened and closed immediately. According to Rackspace, the connections are closed with an RST instead of an FIN, however I don&#39;t see the &quot;abrupt&quot; termination errors in RabbitMQ logs, all I see is a large number (about 35,000 per day) of messages like this:</div>


<div><br></div><div><div>=INFO REPORT==== 21-Nov-2012::10:57:26 ===</div><div>accepting AMQP connection &lt;0.30152.855&gt; (<a href="http://192.168.221.206:58724" target="_blank">192.168.221.206:58724</a> -&gt; <a href="http://192.168.220.208:5672" target="_blank">192.168.220.208:5672</a>)</div>


<div><br></div><div>=INFO REPORT==== 21-Nov-2012::10:57:26 ===</div><div>closing AMQP connection &lt;0.30152.855&gt; (<a href="http://192.168.221.206:58724" target="_blank">192.168.221.206:58724</a> -&gt; <a href="http://192.168.220.208:5672" target="_blank">192.168.220.208:5672</a>)</div>


<div><br></div><div>Is this normal? What could be causing this? How can I further troubleshoot this?</div><div><br></div><div>Many thanks!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>~AV</div></font></span><div>

<div class="h5"><div><br></div><br><div class="gmail_quote">On Wed, Nov 28, 2012 at 5:18 AM, Emile Joubert <span dir="ltr">&lt;<a href="mailto:emile@rabbitmq.com" target="_blank">emile@rabbitmq.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Andrei,<br>
<br>
On 27/11/12 17:32, Andrei Volkov wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think (but not sure) it seems to happen after a period of inactivity,<br>
after the connection has been open but idle for a while.<br>
</blockquote>
<br>
In that case a possible cause is that the connection dropped due to a time-out. You can work around this by enabling AMQP heartbeats. They will prevent inactivity and detect broken connections sooner. See the client library documentation for 2.8.7:<br>



<br>
<a href="http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v2.8.7/rabbitmq-dotnet-client-2.8.7-client-htmldoc/html/type-RabbitMQ.Client.ConnectionFactory.html#field-F:RabbitMQ.Client.ConnectionFactory.RequestedHeartbeat" target="_blank">http://www.rabbitmq.com/<u></u>releases/rabbitmq-dotnet-<u></u>client/v2.8.7/rabbitmq-dotnet-<u></u>client-2.8.7-client-htmldoc/<u></u>html/type-RabbitMQ.Client.<u></u>ConnectionFactory.html#field-<u></u>F:RabbitMQ.Client.<u></u>ConnectionFactory.<u></u>RequestedHeartbeat</a><br>



<br>
You can also diagnose connectivity issues by issuing &quot;rabbitmqctl list_connections&quot; on the broker and by checking &quot;netstat&quot; on both the broker and the client.<span><font color="#888888"><br>

<br>
<br>
<br>
<br>
-Emile<br>
<br>
<br>
<br>
</font></span></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div>