Add RABBITMQ_ULIMIT_NOFILES with default value

The default value helps work around an erlang bug which leads to high
CPU usage:
https://groups.google.com/forum/#!topic/rabbitmq-users/hO06SB-QBqc
This commit is contained in:
Thomas Riccardi
2018-04-16 12:09:22 +02:00
parent c3afc9eadf
commit 2df31c95e0
5 changed files with 15 additions and 0 deletions

View File

@@ -6,6 +6,8 @@
print_welcome_page
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
. /init.sh
nami_initialize rabbitmq
info "Starting rabbitmq... "
fi

View File

@@ -0,0 +1,5 @@
# set defaults
export RABBITMQ_ULIMIT_NOFILES=${RABBITMQ_ULIMIT_NOFILES:-65536}
# apply resources limits
ulimit -n "${RABBITMQ_ULIMIT_NOFILES}"

View File

@@ -6,6 +6,8 @@
print_welcome_page
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
. /init.sh
nami_initialize rabbitmq
info "Starting rabbitmq... "
fi

View File

@@ -0,0 +1,5 @@
# set defaults
export RABBITMQ_ULIMIT_NOFILES=${RABBITMQ_ULIMIT_NOFILES:-65536}
# apply resources limits
ulimit -n "${RABBITMQ_ULIMIT_NOFILES}"

View File

@@ -172,6 +172,7 @@ Available variables:
- `RABBITMQ_CLUSTER_PARTITION_HANDLING`: Cluster partition recovery mechanism. Default: **ignore**
- `RABBITMQ_MANAGER_PORT_NUMBER`: Manager port. Default: **15672**
- `RABBITMQ_DISK_FREE_LIMIT`: Disk free space limit of the partition on which RabbitMQ is storing data. Default: **{mem_relative, 1.0}**
- `RABBITMQ_ULIMIT_NOFILES`: Resources limits: maximum number of open file descriptors. Default: **65536**
## Setting up a cluster