[rabbitmq-discuss] Number of connections and memory usage

Matthias Radestock matthias at rabbitmq.com
Fri Sep 23 20:18:05 BST 2011


Raphael,

On 23/09/11 19:11, Raphael Simon wrote:
> We are using RabbitMQ 2.4 in our production environment and are running
> into issues with memory usage. We are seeing a direct relation between
> the number of connections and the memory usage (the graphs are
> identical). The ratio is 200 KB / connection which seems hefty
> especially with about 50,000 connections open on each broker this ends
> up consuming all the ram.
> [...]
> I'm wondering if there is a setting somewhere that can be tweaked

Reduce the socket send and receive buffer sizes by sticking the 
following in your rabbitmq.config:

[{rabbit, [{tcp_listen_options, [binary,
                                  {packet,        raw},
                                  {reuseaddr,     true},
                                  {backlog,       128},
                                  {nodelay,       true},
                                  {sndbuf,        1024},
                                  {recbuf,        1024},
                                  {exit_on_close, false}]}]}].

(All but the sndbuf and recbuf settings are identical to the defaults)


Regards,

Matthias.


More information about the rabbitmq-discuss mailing list