New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSError: Socket closed in celery worker with eventlet #4817
Comments
Note that when using
|
And
|
Also, I can confirm that I see the same behavior on the latest development versions of all libraries, using this Dockerfile:
|
This matches what we are experiencing. On a single queue, we have multiple workers Switching back to Celery 3.x makes this issue "disappear" FYIAt first, retries weren't working when using celery 4.1.0 and kombu 4.1.0. After updating both to 4.2.0 and 4.2.1 respectively, retries started to work but same timeout messages started to appear and tasks seemed to be delivered correctly but never processed by workers. We are using -amqp==2.2.2
+amqp==1.4.9
-billiard==3.5.0.3
+billiard==3.3.0.23
-celery==4.2.0
+celery==3.1.23
-kombu==4.2.1
+kombu==3.0.34
-pyramid-celery==3.0.0
+pyramid-celery==2.0.0 |
The broker connection uses the heartbeat setting from app config file by default (since version Configuration and defaults - Documentation
You can try to set |
@y0ngdi I set
the worker reports several errors with a Traceback:
|
I encounterd this issue with celery 4.2 and eventlet but no perfect solution found |
I did a little investigation. Celery does create a new connection but does not call |
Minimal example:
Run the example
RabbitMQ logs
Attempt to send a command after the connection has been closed by RabbitMQ:
Celery worker log prints this when it receives the command:
Possible cause of errorI think there exists a connection that is terminated after from the server side because |
I'm seeing the same issue with gevent. |
Workaround with Installed versions:
Worker: P.S. Tested on Windows 10, with Python 2 & 3. |
@auvipy : Why closing ? The issue is not fixed... |
did @stojan-jovic workaround work? |
It seems like yes, but a workaround is not bugfix. |
if you come up with a possible fix then it will be re opened. |
Workaround with |
Django 1.8.4, Python 2.7.12 |
@auvipy why did you close this? The problem still exists. |
This comment was marked as abuse.
This comment was marked as abuse.
Any updates on this ? A work-around is not a bug fix. |
feel free to investigate the issue @gvdmarck as you are facing this, it would be easier for you to find out the root cause. |
I have been seeing repeated emailed errors from Django reporting "ConnectionResetError: [Errno 104] Connection reset by peer" in the call to get task status i.e: File "/opt/layerindex/layerindex/views.py" in task_log_view 1572. if result.ready(): Digging around this seems to be some sort of known bug: celery/celery#4817 celery/celery#4980 The workaround suggested is to disable the broker heartbeat, so try that in order to avoid the errors. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
I have been seeing repeated emailed errors from Django reporting "ConnectionResetError: [Errno 104] Connection reset by peer" in the call to get task status i.e: File "/opt/layerindex/layerindex/views.py" in task_log_view 1572. if result.ready(): Digging around this seems to be some sort of known bug: celery/celery#4817 celery/celery#4980 The workaround suggested is to disable the broker heartbeat, so try that in order to avoid the errors. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
should be BROKER_HEARTBEAT instead of CELERY_BROKER_HEARTBEAT? |
I am trying to run celery worker with this configuration, but celery worker is not starting up. @stojan-jovic , can you let me know how to setup the environment for celery. |
facing the same issue, please to all the people out there who were able to solve this share your solutions :) celery_hearbeat = 0 doesn't work for me.. |
@LeadhuntAI can you try this please and let us know celery/py-amqp#374? |
Is there any fix for this? Observing it on Celery-4.3.1, Kombu-4.6.11, Redis-4.1.2 This happens especially when disable_sync_subtasks=False is used |
@harshita01398 i switched to pool=gevent and its running since a long while now without issues (except that sometimes celery switches itself off, like the execution in the console stops, no idea why but overall it works great) |
Celery version:
4.2.0
Steps to reproduce
docker-compose.yml
Dockerfile
$ docker-compose up --build
Expected behavior
Worker stays connected without errors
Actual behavior
3 minutes after startup, the worker reports several errors with a Traceback, similar to the following:
In addition, the rabbitmq server reports warnings similar to the following (repeated twice):
The text was updated successfully, but these errors were encountered: