I am getting started with Celery for a Django project. For local development purposes I've set it up with djcelery and djkombu (database transport), according to these instructiuons http://ask.github.com/celery/tutorials/otherqueues.html#django-database but plan on using rabbitmq on the production server.
I've found that it works but that one or more of the workers will hang at random. The workers hang on different tasks, so it's not a case that one particular task is entering an infinite loop. When I try to shut down celery, in the log I usually see all the workers exiting except for one. Both before and after a worker hangs, I've tried using celeryctl to get information about the workers, but celeryctl always fails with a message "Error: No nodes replied within time constraint. ". I've also tried inspecting workers http://docs.celeryproject.org/en/latest/userguide/workers.html#inspecting-workers but all of the methods return nothing.
Any ideas about how to diagnose what's causing the worker to hang or would be helpful.
Celery Worker is the one which is going to run the tasks. celery -A tasks worker --pool=prefork --concurrency=1 --loglevel=info. Above is the command to start the worker.
As for --concurrency celery by default uses multiprocessing to perform concurrent execution of tasks. The number of worker processes/threads can be changed using the --concurrency argument and defaults to the number of available CPU's if not set.
Celery worker is set to timeout after 10 seconds with soft timeout of 5 seconds. A delay is introduced to the celery task in order to cause a timeout. The timeout Exception is never raised by Celery worker.
I was having the same problem. I think this is because you're using ghettoq which does not support events.
According to ask:
remote control commands (broadcast) and events does not work with ghettoq.
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