Celery workers receiving "signal 15 (SIGTERM)" randomly

I’m experienced a strange issue in Aptible celery worker. It is randomly receiving signal 15 in the middle of the execution.

Task handler raised error: "WorkerLostError('Worker exited prematurely: signal 15 (SIGTERM) Job: 402.')"

Does anybody has any ideas of what can cause this?

This can happen when your app runs out of memory. Try bumping up the size of your container. Unfortunately python is prone to these kinds of problems…