Once a worker process crosses the --max-memory-per-child
limit, does it get killed and restarted instantly? or does celery allow it to finish the current task (even if it has to consume some more memory while finishing) and then restart it?
According to my tests, it always lets the task finish even if the task uses much more memory than the limit. This is my test:
I added the sleeps just in case to give time for celery to kill the task.
In all cases it always allows the task to finish and then the next task starts with zero (If I change the task to consume less memory than the limit, the next task does not start at zero).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With