[rabbitmq-discuss] BrokerUnrechableException after sending 16366 messages

pavuuu pavankumar.manikonda at schneider-electric.com
Mon Oct 24 07:53:56 BST 2011

Reusing the open connections on client side solved my issue. 

Thanks guys... :)

Does it mean that server doesn't close the connection immediately after it
has been used ??

Simon MacMullen-2 wrote:
> On 21/10/11 16:14, James Carr wrote:
>> One "newb" mistake I often see when devs are initially testing out our
>> dev cluster is they open a connection for each message they send
>> rather than opening one connection and re-using it.  This will quickly
>> use up all the connections on the box and rabbitmq will begin refusing
>> additional requests to connect.
> You should be fine of course as long as you are *closing* those 
> connections too. RabbitMQ will only refuse connections when you have too 
> many active ones.
> But.
> If you churn through connections at a frantic rate, you can get into a 
> state where the entire *client* box can't make outgoing connections for 
> a while, as all your ports in the ephemeral port range still have the 
> remains of an old connection sitting there in the TCP_WAIT state.
> If you run into this it's usually a sign that you should be a bit more 
> economical with connections (to put it mildly), but on Linux at least 
> you can work around it with:
> # echo "1" >/proc/sys/net/ipv4/tcp_tw_reuse
> # echo "1" >/proc/sys/net/ipv4/tcp_tw_recycle
> Cheers, Simon
> -- 
> Simon MacMullen
> RabbitMQ, VMware
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

View this message in context: http://old.nabble.com/BrokerUnrechableException-after-sending-16366-messages-tp32695317p32708315.html
Sent from the RabbitMQ mailing list archive at Nabble.com.

More information about the rabbitmq-discuss mailing list