<div dir="ltr">As I recall, the memory limit doesn't prevent rabbit from using more memory, it's the point at which it stops accepting new connections. It would still allow existing connections to flood the system:<div>
<h2 class="" style="font-family:Helvetica,Arial,sans-serif;margin:20px 0px 0.5em;padding:0px;color:rgb(255,102,0);font-size:1.7em;line-height:18px">Memory-Based Flow Control</h2><p style="clear:left;color:rgb(85,85,85);font-family:Verdana,sans-serif;font-size:13px;line-height:18px">
The RabbitMQ server detects the total amount of RAM installed in the computer on startup and when <span class="" style="color:rgb(51,51,51);font-family:'Courier New',Courier,monospace;font-size:small;white-space:nowrap">rabbitmqctl set_vm_memory_high_watermark <em>fraction</em></span> is executed. By default, when the RabbitMQ server uses above 40% of the installed RAM, it raises a memory alarm and <b><u>blocks all connections. </u></b>Once the memory alarm has cleared (e.g. due to the server paging messages to disk or delivering them to clients) normal service resumes.</p>
<p style="clear:left;color:rgb(85,85,85);font-family:Verdana,sans-serif;font-size:13px;line-height:18px"><br></p><p style="clear:left;color:rgb(85,85,85);font-family:Verdana,sans-serif;font-size:13px;line-height:18px">No clue about the plugins memory.</p>
<div>Jason</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 7, 2014 at 11:16 AM, Dmitry Andrianov <span dir="ltr"><<a href="mailto:dmitry.andrianov@alertme.com" target="_blank">dmitry.andrianov@alertme.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello.<br>
We are trying to load-test RabbitMQ server in different configurations on Amazon EC2 node.<br>
Most of our tests end with Linux OOM killer intervening and killing Rabbit.<br>
That is something I cannot really understand especially given that it is reproducible even with vm_memory_high_watermark set to 0.2 and no other processes running on that box.<br>
So if someone could shed some light onto that issue it would help a lot.<br>
<br>
Below the status response not long before the process was killed:<br>
<br>
{os,{unix,linux}},<br>
{erlang_version,<br>
"Erlang R15B01 (erts-5.9.1) [source] [64-bit] [async-threads:30] [kernel-poll:true]\n"},<br>
{memory,<br>
[{total,1984625336},<br>
{connection_procs,1235761240},<br>
{queue_procs,142935728},<br>
{plugins,-44730984},<br>
{other_proc,34065132},<br>
{mnesia,32001976},<br>
{mgmt_db,233149752},<br>
{msg_index,13545296},<br>
{other_ets,49861192},<br>
{binary,148478688},<br>
{code,20404184},<br>
{atom,793505},<br>
{other_system,118359627}]},<br>
{vm_memory_high_watermark,0.2}<u></u>,<br>
{vm_memory_limit,804643635},<br>
{disk_free_limit,50000000},<br>
{disk_free,1843380224},<br>
{file_descriptors,<br>
[{total_limit,64900},<br>
{total_used,11681},<br>
{sockets_limit,58408},<br>
{sockets_used,11677}]},<br>
{processes,[{limit,1048576},{<u></u>used,198557}]},<br>
{run_queue,6},<br>
{uptime,575}]<br>
<br>
Couple of strange things there are:<br>
<br>
1. {vm_memory_limit,804643635} but still memory {total,1984625336}. How is that possible? <a href="https://www.rabbitmq.com/memory.html" target="_blank">https://www.rabbitmq.com/<u></u>memory.html</a> says that erlang process can take twice the configured size so I expected that but it is definitely more than twice.<br>
<br>
2. {plugins,-44730984} - how this one is possible?<br>
<br>
And just in cast it is needed, below is /proc/X/status<br>
<br>
VmPeak: 2267580 kB<br>
VmSize: 2110952 kB<br>
VmLck: 0 kB<br>
VmHWM: 2096276 kB<br>
VmRSS: 2020848 kB<br>
VmData: 2075168 kB<br>
VmStk: 88 kB<br>
VmExe: 1604 kB<br>
VmLib: 4848 kB<br>
VmPTE: 4304 kB<br>
Threads: 31<br>
<br>
<br>
Thanks in advance!<br>
<br>
<br>
<br>
<br>
<br>
<br>
This email is for the use of the intended recipient(s) only.<br>
If you have received this email in error, please notify the sender immediately and then delete it.<br>
If you are not the intended recipient, you must not use, disclose or distribute this email without the<br>
author's prior permission. AlertMe.com Ltd. is not responsible for any personal views expressed<br>
in this message or any attachments that are those of the individual sender.<br>
<br>
AlertMe.com Ltd, 30 Station Road, Cambridge, CB1 2RE, UK.<br>
Registered in England, Company number 578 2908, VAT registration number GB 895 9914 42.<br>
<br>
<br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Jason McIntosh<br><a href="https://github.com/jasonmcintosh/" target="_blank">https://github.com/jasonmcintosh/</a><br>573-424-7612</div>
</div>