From 7e4754392d74dcfbf976cac16b3c2ead1b9aaace Mon Sep 17 00:00:00 2001 From: Weichen Zhao <61238101+SeasonPilot@users.noreply.github.com> Date: Tue, 31 Mar 2026 10:17:47 +0800 Subject: [PATCH] feat: increase default celery worker concurrency to 4 (#33105) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Crazywoola <100913391+crazywoola@users.noreply.github.com> --- docker/.env.example | 6 ++++-- docker/docker-compose.yaml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker/.env.example b/docker/.env.example index 9fbf9a9e72..b2d6244b46 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -186,8 +186,10 @@ CELERY_WORKER_CLASS= # it is recommended to set it to 360 to support a longer sse connection time. GUNICORN_TIMEOUT=360 -# The number of Celery workers. The default is 1, and can be set as needed. -CELERY_WORKER_AMOUNT= +# The number of Celery workers. The default is 4 for development environments +# to allow parallel processing of workflows, document indexing, and other async tasks. +# Adjust based on your system resources and workload requirements. +CELERY_WORKER_AMOUNT=4 # Flag indicating whether to enable autoscaling of Celery workers. # diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 737a62020c..ed68107f46 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -46,7 +46,7 @@ x-shared-env: &shared-api-worker-env SERVER_WORKER_CONNECTIONS: ${SERVER_WORKER_CONNECTIONS:-10} CELERY_WORKER_CLASS: ${CELERY_WORKER_CLASS:-} GUNICORN_TIMEOUT: ${GUNICORN_TIMEOUT:-360} - CELERY_WORKER_AMOUNT: ${CELERY_WORKER_AMOUNT:-} + CELERY_WORKER_AMOUNT: ${CELERY_WORKER_AMOUNT:-4} CELERY_AUTO_SCALE: ${CELERY_AUTO_SCALE:-false} CELERY_MAX_WORKERS: ${CELERY_MAX_WORKERS:-} CELERY_MIN_WORKERS: ${CELERY_MIN_WORKERS:-}