-
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 pool doesn't recover from aborts or resets #1772
Comments
does running |
|
The main problem here is that the built-in One possible solution would be to catch the superclass |
Ah good catch! We’re these part of socket.error before?
…On Fri, Dec 3, 2021 at 5:16 AM Iñaki Ucar ***@***.***> wrote:
The main problem here is that the built-in ConnectionError has
BrokenPipeError, ConnectionAbortedError, ConnectionRefusedError and
ConnectionResetError as subclasses. But redis and aioredis are
overwriting ConnectionError, and these other errors are not subclasses
anymore. Consequently, the pool's get_connection method, which expects a
ConnectionError, cannot catch them.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1772 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOLG4VRWYYZV3UVBQMVBS6LUPCKGTANCNFSM5JID4SMQ>
.
|
I think so. |
Hm aioredis prior to the current latest commit (fix socket.error) had class ConnectionError inherit from RedisError and builtins.ConnectionError which would still lead to an exception being raised if we use the OSError approach. |
Version: 4.0.2
Platform: Python 3.9.7 on Fedora 34
Description: Steps to reproduce:
The same happens if there's a firewall that resets the connection, but then a
ConnectionResetError
is obtained instead. This doesn't happen with v3.5.3, which automatically detects the loss of connection and sets up a new one.The text was updated successfully, but these errors were encountered: