Merge pull request #14410 from rabbitmq/set-max-open-files

Add RABBITMQ_MAX_OPEN_FILES variable to the startup script
This commit is contained in:
Michael Klishin 2025-08-20 13:05:55 -04:00 committed by GitHub
commit 4a2d2964af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,13 @@ start_rabbitmq_server() {
_rmq_env_set_erl_libs
if [ -n "$RABBITMQ_MAX_OPEN_FILES" ]; then
if ! ulimit -n ${RABBITMQ_MAX_OPEN_FILES}; then
echo "Error: Failed to set maximum number of open files to ${RABBITMQ_MAX_OPEN_FILES}" >&2
exit 1
fi
fi
RABBITMQ_START_RABBIT=
[ "x" = "x$RABBITMQ_ALLOW_INPUT" ] && RABBITMQ_START_RABBIT=" -noinput"
if test -z "$RABBITMQ_NODE_ONLY"; then