[rabbitmq-discuss] rabbitmq-server dies from out of memory

François Beausoleil francois.beausoleil at gmail.com
Tue Oct 29 21:10:13 GMT 2013

Hi all!

I have a bare metal server with 32 GiB of RAM. I installed RabbitMQ 3.2.0, 
Erlang R16B02.

When load increases (publishing over 4000 msgs/s), RabbitMQ dies with 
"Could not allocate memory" errors:

Crash dump was written to: erl_crash.dump
eheap_alloc: Cannot allocate 529782288 bytes of memory (of type "heap").

The messages which are published are about 4 KiB of XML. The persistent 
option is set to true, to ensure persistence across reboots.

The host has configuration for overcommit:

# cat /proc/sys/vm/overcommit_ratio
# cat /proc/sys/vm/overcommit_memory

On start, RabbitMQ correctly identifies the total amount of memory:

=INFO REPORT==== 29-Oct-2013::20:58:03 ===
node           : rabbit at skyler
home dir       : /var/lib/rabbitmq
config file(s) : (none)
cookie hash    : mV5+4OI0hTEXkDPMtOzVdQ==
log            : /var/log/rabbitmq/rabbit at skyler.log
sasl log       : /var/log/rabbitmq/rabbit at skyler-sasl.log
database dir   : /var/lib/rabbitmq/mnesia/rabbit at skyler

=INFO REPORT==== 29-Oct-2013::20:58:04 ===
Limiting to approx 3996 file handles (3594 sockets)

=INFO REPORT==== 29-Oct-2013::20:58:04 ===
Memory limit set to 12826MB of 32066MB total.

=INFO REPORT==== 29-Oct-2013::20:58:04 ===
Disk free limit set to 50MB

On the same host, I'm also running a Java application. The Java 
application's max heap is set to 6 GiB, through -Xmx6g.

Google and StackOverflow aren't very helpful: there are a few mentions, but 
not many apply to RabbitMQ, and the other ones don't seem to apply or are 
very old.

What can I do to troubleshoot the problem?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131029/cb1cfe86/attachment.htm>

More information about the rabbitmq-discuss mailing list