From 37517c35c98be10c3159d1c949bbb419a2e8caeb Mon Sep 17 00:00:00 2001 From: Kyle Mistele Date: Sat, 15 Mar 2025 20:24:58 +0000 Subject: [PATCH] fix: celery concurrency in docker --- Dockerfile-node | 2 +- Dockerfile-node-dev | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile-node b/Dockerfile-node index aac9350..b181bb7 100644 --- a/Dockerfile-node +++ b/Dockerfile-node @@ -50,6 +50,6 @@ CMD set -x && \ uv run python -m node.storage.db.init_db 2>&1 && \ uv run python -m node.storage.hub.init_hub 2>&1 && \ uv run python -m node.storage.hub.init_hub --user 2>&1 && \ - ((uv run celery -A node.worker.main:app worker --loglevel=info | tee /dev/stdout) & ) && \ + ((uv run celery -A node.worker.main:app worker --loglevel=info --concurrency=120 --max-tasks-per-child=100 --max-memory-per-child=350000 | tee /dev/stdout) & ) && \ ((uv run python -m node.server.server --communication-protocol http --port 7001) &) && \ uv run python -m node.server.server --communication-protocol ws --port 7002 diff --git a/Dockerfile-node-dev b/Dockerfile-node-dev index 4b3486a..f51e3ab 100644 --- a/Dockerfile-node-dev +++ b/Dockerfile-node-dev @@ -47,6 +47,6 @@ EXPOSE 7001 7002 CMD (uv run -m node.storage.db.init_db | tee /dev/stdout) && \ (uv run -m node.storage.hub.init_hub | tee /dev/stdout) && \ (uv run -m node.storage.hub.init_hub --user | tee /dev/stdout) && \ - ((uv run -m celery -A node.worker.main:app worker --loglevel=info | tee /dev/stdout) & ) && \ + ((uv run -m celery -A node.worker.main:app worker --loglevel=info --concurrency=120 --max-tasks-per-child=100 --max-memory-per-child=350000 | tee /dev/stdout) & ) && \ (uv run -m node.server.server --communication-protocol http --port 7001 | tee /dev/stdout) & \ uv run -m node.server.server --communication-protocol ws --port 7002 | tee /dev/stdout \ No newline at end of file