Celery not returning results with uwsgi but working with flask development server

113 views
Skip to first unread message

sandeep

unread,
Apr 21, 2020, 12:53:47 AM4/21/20
to celery-users
Problem is I'm running parallel calls using celery with the help of uwsgi and nginx but celery(rabbitmq is the broker, tried redis also) is not returning results, after running one call it is hanging without any error. But with flask development server it is working fine. Please suggest any solution.

Bernd Wechner

unread,
Apr 21, 2020, 9:24:20 AM4/21/20
to celery-users
I admit you're worrying me as I have yet to roll Celery out to my production site under uwsgi and have been working on solutions with a development server to date.

Still, I am left wondering that you would do yourself and us a great service if you clarified exactly what it is that you are experiencing. You say something is hanging. But what? And evidenced how?

What I can suggest is debugging the comms at two levels:
  1. flower will give you a good look at the Celery queues and what's in them
  2. RabbitMQ's web management interface will also give you a great look at its queues and what 's in them
But that assumes messaging is the issue. It could just as well be that you are not running celery workers robustly, and so to check on those use the celery inspection tools:

https://docs.celeryproject.org/en/stable/userguide/monitoring.html#management-command-line-utilities-inspect-control

They can tell you a lot about workers, clusters, nodes, and their status etc. If you have no workers running for example you won't get a response and that may be because you've not configured your system to run them porperly or they are crashing ... in which case checking logs may help or running a worker manually (logging info then comes straight to console).

sandeep

unread,
Apr 22, 2020, 6:25:57 AM4/22/20
to celery-users
I have inspected celery stats it is receiving only one task (I'm sending 30 tasks using apply_async and i want the results back). While after 60 seconds uwsgi automatically getting timed out as expected. And showing the following error like below. Could that be because of uwsgi configuration ?   

uwsgi_response_writev_headers_and_body_do(): Broken pipe [core/writer.c line 306].

sandeep

unread,
Apr 22, 2020, 6:25:58 AM4/22/20
to celery-users
I have inspected celery stats it is receiving only one task (I'm sending 30 tasks using apply_async and i want the results back). While after 60 seconds uwsgi automatically getting timed out as expected. And showing the following error like below. Could that be because of uwsgi configuration ?   

uwsgi_response_writev_headers_and_body_do(): Broken pipe [core/writer.c line 306].



On Tuesday, April 21, 2020 at 10:23:47 AM UTC+5:30, sandeep wrote:
Reply all
Reply to author
Forward
0 new messages