You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ability to specify RAM VM watermark in absolute terms #48
Now that 3.5.7 is out, I think it's probably worth documenting and/or implementing something along these lines. Looking at the docs (https://github.com/rabbitmq/rabbitmq-website/pull/96/files), I'm wondering if this might make sense for our entrypoint script to set automatically if it detects a memory limit (basically just letting RabbitMQ itself know that there is a memory limit so we get graceful behavior instead of unexpected OOM).
Looking at that upstream PR again, it would appear that in the face of an enormously outrageous number, RabbitMQ would act intelligently and instead cap at available memory, so we can probably just use the container's memory.limit_in_bytes directly (converted to MB like RabbitMQ expects, of course):
$ docker run -it --rm alpine cat /sys/fs/cgroup/memory/memory.limit_in_bytes9223372036854771712
$ docker run -it --rm -m 8m alpine cat /sys/fs/cp/memory/memory.limit_in_bytes8388608
I'm running and setting the memory limit to 80MB(80388608 bytes) but the rabbitMQ container doesn't seem to respect that, it goes ahead and allocates its own memory based on the total 2GB out of my machine.
root@test-broker-1:~# docker run -it --rm -m 80388608 rabbitmq:3.6.5-management
RabbitMQ 3.6.5. Copyright (C) 2007-2016 Pivotal Software, Inc.
Activity
yosifkit commentedon Oct 22, 2015
Oh, neat. Thanks for the heads up. Do you think we need to add to the documentation on Docker Hub?
michaelklishin commentedon Oct 23, 2015
@yosifkit I think so but lets wait till
3.5.7is actually out. We'll keep you posted.tianon commentedon Jan 22, 2016
Now that 3.5.7 is out, I think it's probably worth documenting and/or implementing something along these lines. Looking at the docs (https://github.com/rabbitmq/rabbitmq-website/pull/96/files), I'm wondering if this might make sense for our entrypoint script to set automatically if it detects a memory limit (basically just letting RabbitMQ itself know that there is a memory limit so we get graceful behavior instead of unexpected OOM).
mthenw commentedon Jan 22, 2016
I will just +1 @tianon's idea. Would be great!
tianon commentedon Aug 22, 2016
Looking at that upstream PR again, it would appear that in the face of an enormously outrageous number, RabbitMQ would act intelligently and instead cap at available memory, so we can probably just use the container's
memory.limit_in_bytesdirectly (converted to MB like RabbitMQ expects, of course):tianon commentedon Aug 22, 2016
More explicitly:
tianon commentedon Aug 22, 2016
Even more explicitly, here's the exact PR I'm contemplating:
komuw commentedon Sep 23, 2016
I'm running and setting the memory limit to 80MB(80388608 bytes) but the rabbitMQ container doesn't seem to respect that, it goes ahead and allocates its own memory based on the total 2GB out of my machine.
root@test-broker-1:~# docker run -it --rm -m 80388608 rabbitmq:3.6.5-management
## Licensed under the MPL. See http://www.rabbitmq.com/
########## Logs: tty
## tty
##########
Starting broker...
=INFO REPORT==== 23-Sep-2016::11:01:18 ===
Starting RabbitMQ 3.6.5 on Erlang 19.0
Copyright (C) 2007-2016 Pivotal Software, Inc.
Licensed under the MPL. See http://www.rabbitmq.com/
=INFO REPORT==== 23-Sep-2016::11:01:18 ===
node : rabbit@b59f7874b4fb
home dir : /var/lib/rabbitmq
config file(s) : /etc/rabbitmq/rabbitmq.config
cookie hash : someHash==
log : tty
sasl log : tty
database dir : /var/lib/rabbitmq/mnesia/rabbit@b59f7874b4fb
=INFO REPORT==== 23-Sep-2016::11:01:23 ===
Memory limit set to 801MB of 2002MB total.
System stats:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
4.5.7-std-3
Docker version 1.12.1, build 23cf638