Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

celery memory management

Tags:

python

celery

I have a 3 celery nodes running between 6 and 8 workers each and my tasks tend to use a lot of memory. It seems that when the tasks finish, they aren't releasing the memory. Is there a way to either tell the worker process to die and restart after execution completes, or improve celery's garbage collection?

like image 554
Bacon Avatar asked May 08 '11 15:05

Bacon


1 Answers

For those workers you could set max-tasks-per-child-setting to one.

like image 82
MattH Avatar answered Oct 21 '22 19:10

MattH