From c39240f0d679d6abad6c0a9cf3cebfc77bd73345 Mon Sep 17 00:00:00 2001 From: yvanzo Date: Mon, 2 Oct 2023 12:39:38 +0200 Subject: [PATCH] Explicitely set ulimits for mq to ERL_MAX_PORTS (#258) 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: