From 388925f6f8362977d22651b0959237a1f7e58fb6 Mon Sep 17 00:00:00 2001 From: yvanzo Date: Tue, 5 Sep 2023 08:02:57 +0100 Subject: [PATCH] Explicitely set ulimits for mq to ERL_MAX_PORTS On Linux ERL_MAX_PORTS defaults to 65,536. But the Docker container for the service `mq` rather uses the host ulimits. When ulimits is infinite, it can make the container to take a very long time to start while using a lot of CPU for nothing. It depends on the host settings. This patch explicitely sets ulimits to 65,536 as recommended for `mq`. See https://github.com/docker-library/rabbitmq/issues/545 for details. --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 8fd85808..38915773 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -113,6 +113,8 @@ services: max-size: "10m" max-file: "10" restart: unless-stopped + ulimits: + nofile: 65536 volumes: - mqdata:/var/lib/rabbitmq expose: