Hi Marek,<br><br>Later i found out that the Amazon ELB has a 60 seconds period of inactivity. So the connection was getting closed after 60 seconds.<br>Setting the heartbeat in the connection factory helped in not losing the connection. <br>
<br>Thanks,<br>Dhinesh Kumar <br><br><div class="gmail_quote">On Wed, Jun 29, 2011 at 9:31 PM, Marek Majkowski <span dir="ltr">&lt;<a href="mailto:majek04@gmail.com">majek04@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m afraid we don&#39;t have much experience with Amazon ELB. Maybe there<br>
is some kind of timeout after which the connection is broken?<br>
<br>
Cheers,<br>
 Marek<br>
<div><div></div><div class="h5"><br>
<br>
On Wed, Jun 22, 2011 at 13:00, Dhinesh Kumar &lt;<a href="mailto:dhinesh.ravi@gmail.com">dhinesh.ravi@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I am trying to run a RabbitMQ broker behind an ELB.<br>
&gt; The amqp connection gets established but it is getting closed after<br>
&gt; sometime.<br>
&gt;<br>
&gt; with this kind of message:<br>
&gt;<br>
&gt; =ERROR REPORT==== 22-Jun-2011::11:27:59 ===<br>
&gt; ** Generic server &lt;0.149.0&gt; terminating<br>
&gt; ** Last message in was socket_closed<br>
&gt; ** When Server state == {state,amqp_network_connection,<br>
&gt;<br>
&gt; {state,#Port&lt;0.651&gt;,0,&lt;0.153.0&gt;,131072,undefined,<br>
&gt;                                 false},<br>
&gt;                             &lt;0.148.0&gt;,&lt;0.151.0&gt;,<br>
&gt;                             {amqp_params,&lt;&lt;&quot;guest&quot;&gt;&gt;,&lt;&lt;&quot;guest&quot;&gt;&gt;,&lt;&lt;&quot;/&quot;&gt;&gt;,<br>
&gt;<br>
&gt; &quot;BrokerHostname&quot;,<br>
&gt;                                 5672,nonode@nohost,0,0,0,none,<br>
&gt;                                 [#Fun&lt;amqp_auth_mechanisms.plain.3&gt;,<br>
&gt;                                  #Fun&lt;amqp_auth_mechanisms.amqplain.3&gt;],<br>
&gt;                                 none,[]},<br>
&gt;                             0,<br>
&gt;                             [{&lt;&lt;&quot;capabilities&quot;&gt;&gt;,table,<br>
&gt;                               [{&lt;&lt;&quot;publisher_confirms&quot;&gt;&gt;,bool,true},<br>
&gt;                                {&lt;&lt;&quot;exchange_exchange_bindings&quot;&gt;&gt;,bool,true},<br>
&gt;                                {&lt;&lt;&quot;basic.nack&quot;&gt;&gt;,bool,true},<br>
&gt;                                {&lt;&lt;&quot;consumer_cancel_notify&quot;&gt;&gt;,bool,true}]},<br>
&gt;                              {&lt;&lt;&quot;copyright&quot;&gt;&gt;,longstr,<br>
&gt;                               &lt;&lt;&quot;Copyright (C) 2007-2011 VMware, Inc.&quot;&gt;&gt;},<br>
&gt;                              {&lt;&lt;&quot;information&quot;&gt;&gt;,longstr,<br>
&gt;                               &lt;&lt;&quot;Licensed under the MPL.  See<br>
&gt; <a href="http://www.rabbitmq.com/" target="_blank">http://www.rabbitmq.com/</a>&quot;&gt;&gt;},<br>
&gt;                              {&lt;&lt;&quot;platform&quot;&gt;&gt;,longstr,&lt;&lt;&quot;Erlang/OTP&quot;&gt;&gt;},<br>
&gt;                              {&lt;&lt;&quot;product&quot;&gt;&gt;,longstr,&lt;&lt;&quot;RabbitMQ&quot;&gt;&gt;},<br>
&gt;                              {&lt;&lt;&quot;version&quot;&gt;&gt;,longstr,&lt;&lt;&quot;2.4.1&quot;&gt;&gt;}],<br>
&gt;                             #Fun&lt;amqp_connection_sup.0.110528238&gt;,<br>
&gt;                             #Fun&lt;amqp_connection_sup.2.116782220&gt;,false}<br>
&gt; ** Reason for termination ==<br>
&gt; ** socket_closed_unexpectedly<br>
&gt;<br>
&gt;<br>
&gt; If i do the same without ELB, the connection is stable.<br>
&gt; Is there any setting which i am missing?<br>
&gt;<br>
&gt; Thanks in advance,<br>
&gt; Dhinesh Kumar<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; rabbitmq-discuss mailing list<br>
&gt; <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
&gt; <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br>