11

As I follow the celery documentation

> from celeryapp import app
> i = app.control.inspect()
> i.active()

The inspection seems to hang. Has anyone seen this before? And can anyone shed some light on why this might happen?

  • It happens when I call reserved, and even for ping. I am guessing if even a ping hangs- a connection isn't being made.

  • I am using AMQP as a broker- to what extent is the broker involved? How can I troubleshoot?

I am guessing this is probably a pretty simple thing to solve- but atm I am lost, and would highly appreciate a clear walkthrough.

Many thanks!

atline
  • 28,355
  • 16
  • 77
  • 113
dgoldman
  • 111
  • 5
  • this happens to me when celery service is running but in 'exited' state, maybe you should check your workers status to debug the problem – mirhossein Oct 05 '19 at 01:30

1 Answers1

0

A celery control command is sent in the celery.pidbox exchange that all celery workers are listening to by default and responded to on short-lived reply queues.

So "to what extent is the broker involved?"

It is the medium the question and answer go through.

"How can I troubleshoot?"

This is the heart of the question and rather involved, any problem in this whole pipeline will cause issues with celery control commands, ping included. Which is why I don't recommend depending on it in a production system to known active tasks or other details.

In no particular order I would check:

  • Connection to the broker from control node (wherever you are running app.control.inspect()),
  • That queues ending in .pidbox are healthy on the broker.
  • That at least one worker is actually responsive.
chicocvenancio
  • 629
  • 5
  • 14