-
-
Notifications
You must be signed in to change notification settings - Fork 930
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
"Error 110 while writing to socket. Connection timed out." With kombu 4.4.0/4.5.0 and redis 3.2.0/3.2.1 #1019
Comments
I confirm that I encountered the same issue and also Error 32 (broken pipe) AS PER #1018 after upgrading to the combination of:
The errors are intermittent: certain transactions work out and write into redis just fine, others break down. The stack traces when errors occur are identical to the ones from the OP. The most up-to-date combination of libraries that seems to guarantee the disappearance of these issues is to my knowledge as follows:
However, I would really like to be able to upgrade to redis >= 3.0 without losing this guarantee. If you could publish a 4.2.x celery version that supports redis 3.x and is stable with respect to #1018 and #1019 it would be greatly appreciated. |
Here is my environment, exceptions only happen when I switch from kombu 4.3.0 and redis 2.10.6 to kombu 4.4.0 and redis 3.2.0 (The environment and the other libraries remaining unchanged) Stack: Libraries: I hope this can help understanding the exceptions. Is there any other information I could collect or tests I could do? |
How about the Redis logs? |
@nyhobbit I don't think that's possible but we can look into it if you'll open a new issue about it. |
@thedrow Ok I will check the logs By upstream you mean python-redis library? I just checked and it seems you're right! Found the following issues in python-redis: Sporadic "Connection not ready" exceptions with BlockingConnectionPool since 3.2.0 (22 days ago) 3.2.0 Error while reading from socket: ('Connection closed by server.',) (15 days ago) |
These 2 previous issues are there in python-redis 3.2.0 Reverting to 3.1.0 would reintroduce this issue that was fixed in 3.2.0: So maybe the previous python-redis 3.0.1 would be fine? But it seems that currently kombu is requiring redis >= 3.2.0 |
Are you using eventlet? 3.0.1 doesn't work since it crashes Celery when forking. |
I am not using eventlet I just posted this comment on redis-py redis/redis-py#1140 (comment) |
I've noticed similar behaviour as well. I had to fix this by catching the error and reconnecting... It is really annoying. It reminds me of another problem that started few months ago - with connection timeouts. I've reported this to Celery but who knows what is really causing it... |
Hi @nyhobbit and @dejlek I still have the issue, how about you? Any update? |
celery 4.3 and latest kombu? |
Hey @alexandre-paroissien, I'm sorry, I gave up and downgraded to Redis 2.10.6 / Kombu 4.3.0 / a forked Celery 4.2 with Python 3.7 support...! I also considered doing what @dejlek did; I think if we have to upgrade and the problem is still there that's what I'll have to do too :(. |
did you try kombu 4.5 and celery 4.3? |
I saw this on two stacks: one with
and another with
In both cases the downgrade to Celery 4.2 / kombu 4.3.0 / redis 2.10.6 fixed it. I don't know which library was causing the issue! Unfortunately we don't have a great testing environment for me to try other combinations. It only appeared intermittently on production, and not at all on staging, I guess because the staging traffic was too low. We have a plan to run some load testing on staging. I very much doubt we'll do it any time soon, but if we do get to that and this issue is still open I'll try newer versions of the libraries! |
I confirm I still encounter this issue in the most recent versions of the libraries (I also had the bug when just upgrading kombu/redis and keeping celery at 4.2.1) I tested in a test app with no traffic apart from me, I launched a simple task manually, first time worked, second time gave the following output (and ending up working)
|
Could it be related to this issue? celery/celery#3932 |
Your problem appeared while upgrading py-redis so I don't know really. |
Right, for anyone reading this, it seems the issue appeared from the 3.x branch of redispy indeed (which is required by celery 4.3+ / kombu 4.4+), and the status of the issue is evolving there: |
I'm experiencing this issue as well. |
On Nov 27, 2019 12:43 PM, Fiftyseventheory <notifications@github.com> wrote:I'm experiencing this issue as well.
celery==4.3.0
kombu==4.6.4
redis==3.3.8
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
It is definitely better with Celery 4.4.0rc3/4, and slightly better with pyamqp instead of redis. I can't say it is totally solved though. We still see these pop up, just not as often.
|
thanks for the report. there is an open PR relating to this check #1122 plz |
I am still seeing this with: Is there any setting i have to change to pick up the fixes in #1122 ? |
I am also still having the issue with the same lib versions |
@wisefool769 @jingtt0704 This issue will still persist in case celery's event loop is not running. Ref - #1019 (comment) |
@auvipy can this issue be reopened? I don't think this is fully resolved yet, as I'm experiencing errors similar to many of the recent commenters on this thread |
@Ashish-Bansal Is there any way that I can help fix this in the case you described where celery's event loop is not running? For clarification, I'm running
|
try latest celery with latest kombu |
Sorry to pile up on this, just wanted to report I am having the same error, and I am on the latest releases of celery, kombu and redis. Traceback
|
Same here. Any fixes on that? |
Same here. |
celery==4.4.0 encounter same issue |
what version of redis are you running? we had a version prior to 5.x and had this issue with following libs noted at the time:
After upgrading we haven't seen the connection time out issue since. Worth ruling out redis in any case.. |
Redis version is 6.2 |
nope, was just a idea :( |
@hampsterx what package and version did you upgrade to? |
What's the solution for this - seen recently on:
|
Let me reopen the issue since it seems to be occurring. |
@matusvalo @seanquinn We were able to fix this by doing the following. You should be able to resolve this by setting the broker_transport_options = {
# Check the health of connections every 5 seconds
'health_check_interval': 5,
} |
is this mentioned in the docs already? if so we can close this |
this might solve one of the issues we see when our redis pod restarts celery/kombu#1019
Still facing the same issue on Celery: 4.3.1 Even after adding health_check_interval, seeing errors in large numbers. Have already added below setting Do we have a fix in any latest updates? |
Fixed after we upgraded Celery |
* Add a health check from celery to redis this solved connection problems between celery and redis for other peeps celery/kombu#1019 * oops had a dev thingy still present in the conf
I was previously on kombu 4.3.0 and redis 2.10.6, and after upgrading to kombu 4.4.0/4.5.0 and redis 3.2.0/3.2.1 I noticed a new issue on my Django REST endpoints:
Error 110 while writing to socket. Connection timed out.
These endpoints never had any issues before and this issue popped up only once since I upgraded, but happened on both endpoints simultaneously
Edit: Bug still there in most recent versions of the libraries (celery 4.3.0, kombu 4.5.0, redis 3.2.1)
(I also had the bug when just upgrading kombu/redis and keeping celery at 4.2.2)
Bug is not there in celery 4.2.2, kombu 4.3.0, redis 2.10.6
The text was updated successfully, but these errors were encountered: