From bc9d34cbec6bdf225e2ab00b942d58eeae9c7a13 Mon Sep 17 00:00:00 2001 From: RhodeCode Admin Date: Wed, 8 Feb 2023 12:20:01 +0100 Subject: [PATCH] config: reduce max-task-per-child to 20 --- configs/development.ini | 2 +- configs/production.ini | 2 +- docs/install/configure-celery.rst | 2 +- rhodecode/lib/celerylib/loader.py | 2 +- rhodecode/tests/rhodecode.ini | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configs/development.ini b/configs/development.ini index 9a3371b6..c5dfca03 100644 --- a/configs/development.ini +++ b/configs/development.ini @@ -397,7 +397,7 @@ celery.broker_url = redis://localhost:6379/8 #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost ; maximum tasks to execute before worker restart -celery.max_tasks_per_child = 100 +celery.max_tasks_per_child = 20 ; tasks will never be sent to the queue, but executed locally instead. celery.task_always_eager = false diff --git a/configs/production.ini b/configs/production.ini index 192afb59..57664fc3 100644 --- a/configs/production.ini +++ b/configs/production.ini @@ -348,7 +348,7 @@ celery.broker_url = redis://localhost:6379/8 #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost ; maximum tasks to execute before worker restart -celery.max_tasks_per_child = 100 +celery.max_tasks_per_child = 20 ; tasks will never be sent to the queue, but executed locally instead. celery.task_always_eager = false diff --git a/docs/install/configure-celery.rst b/docs/install/configure-celery.rst index ea38cfd7..8edfc1a5 100644 --- a/docs/install/configure-celery.rst +++ b/docs/install/configure-celery.rst @@ -68,7 +68,7 @@ In order to install and configure Celery, follow these steps: celery.broker_url = redis://localhost:6379/8 # maximum tasks to execute before worker restart - celery.max_tasks_per_child = 100 + celery.max_tasks_per_child = 20 ## tasks will never be sent to the queue, but executed locally instead. celery.task_always_eager = false diff --git a/rhodecode/lib/celerylib/loader.py b/rhodecode/lib/celerylib/loader.py index 66f5b571..f6879ad8 100644 --- a/rhodecode/lib/celerylib/loader.py +++ b/rhodecode/lib/celerylib/loader.py @@ -70,7 +70,7 @@ base_celery_config = { 'result_expires': 60 * 60 * 24, 'result_persistent': True, 'imports': imports, - 'worker_max_tasks_per_child': 100, + 'worker_max_tasks_per_child': 20, 'accept_content': ['json_ext', 'json'], 'task_serializer': 'json_ext', 'result_serializer': 'json_ext', diff --git a/rhodecode/tests/rhodecode.ini b/rhodecode/tests/rhodecode.ini index e2263a66..b985c1d1 100644 --- a/rhodecode/tests/rhodecode.ini +++ b/rhodecode/tests/rhodecode.ini @@ -314,7 +314,7 @@ celery.broker_url = redis://localhost:6379/8 #celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost ; maximum tasks to execute before worker restart -celery.max_tasks_per_child = 100 +celery.max_tasks_per_child = 20 ; tasks will never be sent to the queue, but executed locally instead. celery.task_always_eager = false