Skip to content

Dockerfile, startup script: add rabbitmq ulimit#492

Open
t-lo wants to merge 2 commits intoONLYOFFICE:masterfrom
t-lo:t-lo/add-rabbitmq-ulimit
Open

Dockerfile, startup script: add rabbitmq ulimit#492
t-lo wants to merge 2 commits intoONLYOFFICE:masterfrom
t-lo:t-lo/add-rabbitmq-ulimit

Conversation

@t-lo
Copy link
Copy Markdown

@t-lo t-lo commented Sep 12, 2022

This change works around an issue in the rabbitmq-server version shipped with Ubuntu 20.04. Large emptyfiles limits in docker containers which run on hosts with low emptyfiles limits cause rabbitmq to break. It will use use 100% CPU of a single core when started, then time out (i.e. fail to start). An erlang process 'erl_child_setup' will continue to use 100% CPU even after rabbitmq failed to start (see docker-library/rabbitmq#545).

The change adds a default emptyfiles limit to rabbitmq-server via /etc/default/rabbitmq-server, which is created in the Dockerfile before rabbitmq is installed. The default is generous: 65536.

Additionally, the change adds a new container environment variable RABBITMQ_EMPTYFILES_LIMIT which, when set, will override the default above.

Fixes #491 .

This change works around an issue in the rabbitmq-server version shipped
with Ubuntu 20.04. Large emptyfiles limits in docker
containers which run on hosts with low emptyfiles limits cause rabbitmq
to break. It will use use 100% CPU of a single core when started, then
time out (i.e. fail to start). An erlang process 'erl_child_setup'
will continue to use 100% CPU even after rabbitmq failed to
start (see docker-library/rabbitmq#545).

The change adds a default emptyfiles limit to rabbitmq-server via
/etc/default/rabbitmq-server, which is created in the Dockerfile before
rabbitmq is installed. The default is generous: 65536.

Additionally, the change ads a new container environment variable
RABBITMQ_EMPTYFILES_LIMIT which, when set, will override the default
above.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Sep 12, 2022

CLA assistant check
All committers have signed the CLA.

@t-lo
Copy link
Copy Markdown
Author

t-lo commented Sep 19, 2022

Friendly ping - any chance of a review / feedback on the PR? Anything I can do to improve it?

@t-lo
Copy link
Copy Markdown
Author

t-lo commented Oct 10, 2022

Updated PR branch to latest master.

@t-lo
Copy link
Copy Markdown
Author

t-lo commented Dec 2, 2022

Superseded by #530 which updates rabbitmq to 3.10.
rabbitmq 3.10.8 fixes the root cause.

Feel free to close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rabbitmq takes forever to start, fails, and still eats 100% CPU after started, if ulimit -n set to a high value

2 participants