# HG changeset patch # User RhodeCode Admin # Date 2023-02-08 11:20:01 # Node ID 2aee089bb5b6343f7c17c3130a7967f41dc9d6ed # Parent 609be9c6f98019fc031b2aea689c76cbad01e639 config: reduce max-task-per-child to 20 diff --git a/configs/development.ini b/configs/development.ini --- a/configs/development.ini +++ b/configs/development.ini @@ -397,7 +397,7 @@ celery.broker_url = redis://localhost:63 #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 --- a/configs/production.ini +++ b/configs/production.ini @@ -348,7 +348,7 @@ celery.broker_url = redis://localhost:63 #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 --- a/docs/install/configure-celery.rst +++ b/docs/install/configure-celery.rst @@ -68,7 +68,7 @@ 3. Configure Celery in the 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 --- 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 --- a/rhodecode/tests/rhodecode.ini +++ b/rhodecode/tests/rhodecode.ini @@ -314,7 +314,7 @@ celery.broker_url = redis://localhost:63 #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