[Django]-Django celery WorkerLostError: Worker exited prematurely: signal 9 (SIGKILL) error

2👍

I got this error due to out of memory error caught in

/var/log/kern.log

I have Tensorflow running in one of my tasks, which needs additional computational power, but my physical memory(RAM) is not sufficient to handle that much load. I weird that there’s no log in celery except SigKill 9 error. But the kernel log helped me to fix it.

1👍

Unless you’ve created a seperate vhost & user for rabbitmq, set the CELERY_BROKER_URL to amqp://guest@localhost//

Also, rather than root, you should set the owner of /var/log/celery/ and /var/run/celery/ to “myuser” as you have set in your celeryd config

1👍

I guess this can be a symptom of OOM. I was deploying a Celery backend in a Docker container – “it worked on my machine” but not in the cluster. I allocated more ram to the task and no longer have the problem.

0👍

In case of docker, I just allocated more resources and it worked.

enter image description here

Leave a comment