[rabbitmq-discuss] rabbitmq-server dies from out of memory
francois.beausoleil at gmail.com
Thu Oct 31 17:57:27 GMT 2013
Le 2013-10-31 à 13:07, Simon MacMullen a écrit :
> On 31/10/13 15:24, François Beausoleil wrote:
>> I changed overcommit_memory from 2 to 0, and RabbitMQ stays up for
>> more than 15 seconds now. That seems to have been my error.
> Ah, thanks for getting back to us.
> I have to admit to being ignorant of Linux overcommit settings. Reading
> the man page I see that /proc/sys/vm/overcommit_memory is described thus:
>> In mode 2 (available since Linux 2.6), the total virtual address
>> space on the system is limited to (SS + RAM*(r/100)), where SS is the
>> size of the swap space, and RAM is the size of the physical memory,
>> and r is the contents of the file /proc/sys/vm/overcommit_ratio.
> So with your settings:
> # cat /proc/sys/vm/overcommit_ratio
> # cat /proc/sys/vm/overcommit_memory
> it sounds like the kernel would refuse to use more than (16GB + swap) of memory. What was the swap space if you don't mind me asking?
My understanding is 32 GB + swap + 50% of physical memory, or 16GB. In other words, if total memory allocations exceeded 52 GB (4 GB swap), the kernel would refuse to allocate memory.
> Unfortunately I don't know if RabbitMQ can detect a situation like this, so it's very possible it went over the kernel's limit while still being within 32GB...
There could be a check in the startup script that only logs a message about overcommit_memory? Don't prevent sysadmins who know what they're doing from doing anything, but for other folks, tell them it might be a problem.
More information about the rabbitmq-discuss