-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Connection lost issue since 4.4.0 upgrade #2491
Comments
@sileht Can you share your connection information / the code you use to connect? |
We use a connection url like this: We use the default pool by creating only one redis client in our app with: All asyncio tasks then use this client, we don't limit the number of connections on purpose, but we actively monitor the number of concurrent connections on the server side. This service is far below the max connection limits of the server (around 30-40 concurrent connections, the limit is set at 400). |
@sileht Can you provide more info what exactly cause the error - the connection? a call to a certain command? something else? |
Also seeing this when running redis-py 4.4.2. Not sure what is causing it. Also using AWS. Our docker image is based on: python:3.11 (Debian GNU/Linux 11 (bullseye))
|
We've also started seeing this after upgrading from redis-py 4.3.4 to 4.4.2. (This is with Python 3.9, and the Azure Redis service, running version 6 of the server.) The exception (or something like it) can be reproduced with the following script and using a local Redis server, if the server is restarted between iterations:
If I restart the local Redis server between iterations 2 and 3 the output is the following:
If instead of connecting to a local server I use a port-forward to our Azure Redis server, and then stop and restart the port-forwarding process, I get the Neither exception happens in 4.3.5; both happen in 4.4.0. Also if I run an equivalent script using the sync Redis client, the exception does not happen in either version. I did some investigating and it seems that in this scenario the next attempt to read from the socket after the server restart will return an empty byte sequence. Prior to 4.4.0 the But the |
I continued a bit the investigation, and it looks like the bug only occurs for PythonParser. If I install hiredis I cannot trigger it. |
@sileht Yeah, same here (hadn't thought to check that before!). Makes sense since the |
We recently upgraded from python 3.9 to 3.11 and, with that, our redis package to our log goes like this:
|
@elarrat Hi, would like to ask have you solved this issue? |
We had the same issue on 4.5.3. Only downgrading to 4.3.5 mentioned above seems to work |
We encountered the same issue, as said upper the flavor |
We encountered the same issue as well, as said @jmcbailey : installing |
hi, we were encountering this same error on:
both methods (downgrading installing |
Just want to chime and and it appears I'm getting bit on this using Azure's redis instance
Is someone able to clarify what "installed hiredis" means? Like did you only pip install it or is there some process you have to go through to get it hooked up? Edit: To answer my own question, it appears to be installed automatically. You can verify with: >>> from redis.asyncio.connection import DefaultParser
>>> DefaultParser
<class 'redis._parsers.hiredis._AsyncHiredisParser'> |
Version: What redis-py and what redis version is the issue happening on?
redis-py: 4.4.0
redis: 6.2.3
Platform: What platform / version? (For example Python 3.5.1 on Windows 7 / Ubuntu 15.10 / Azure)
Docker image of python: 3.11.0 on Debian bullseye
Description: Description of your issue, stack traces from errors and code that reproduces the issue
We upgrade an application to redis-py 4.4.0 and got the following traceback a lot. Downgrading to 4.3.5 solves the issue for us.
If you need more information, feel free to ask.
The text was updated successfully, but these errors were encountered: