I’m running into the connection limit on my RabbitMQ broker
A method for raising the number of allowed connections is discussed in this thread:
http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2011-May/013033.html
On Mon, May 30, 2011 at 06:19:47PM +0530, Dhinesh Kumar wrote:
I am trying to find the maximum number of amqp connections i can establish
with a RabbitMQ broker running on Ubuntu.
I tried both Java and erlang client to create connections but i could not
succeed more than 829 connections.I like to know how can i increase the number ??
And a solution is offered:
On Mon, May 30, 2011 at 8:14AM, Matthew Sackman wrote:
You’re likely hitting the ulimit. Edit /etc/security/limits.conf and
allow the rabbitmq user to have a much higher "nofile" setting. Rabbit
will log on start up how many sockets it’s permitting, so once the
change has taken effect and you’ve restarted rabbit, you should find
log entries to demonstrate it’s working.Matthew
While I can raise this limit, I’d rather close unused connections. Is there a method for expiring connections which have not been used in a certain amount of time?
I fixed this by turning on heartbeats:
https://github.com/pika/pika/blob/master/pika/heartbeat.py
That way, if a connection is interrupted, the server handles shutting it down.