Thursday 3 December 2020

Celery max_tasks_per_child setting is not restarting the worker

Failing on both Celery 4.4.7 and 5.0.2.

My task is leaking a substantial amount of memory. I'd like to restart the worker after each task. I'm starting the celery in a no concurrency mode --concurrency=1 or/and -P solo as the memory used in a single task might be close to the total system memory.

I tried to set the worker_max_tasks_per_child = 1 in the celeryconfig.py and --max-tasks-per-child=1 in CLI, but the worker is not restarting.



from Celery max_tasks_per_child setting is not restarting the worker

No comments:

Post a Comment