You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
BlockingConnectionPool does not recover if redis disconnects. Version: 5.0.1 How to reproduce:
Create a BlockingConnectionPool pool use it for periodic tasks, stop redis/start it back. no query to redis succeeds anymore. Sometimes it recovers but most of the times it does not.
actually the self.release(connection) should be called in a sync manner, because if calls async it will endup in some kind of deadlock with another connection release
The text was updated successfully, but these errors were encountered:
Problem:
BlockingConnectionPool does not recover if redis disconnects.
Version: 5.0.1
How to reproduce:
Create a BlockingConnectionPool pool use it for periodic tasks, stop redis/start it back. no query to redis succeeds anymore. Sometimes it recovers but most of the times it does not.
Possible solution
Connection at this line
https://github.com/redis/redis-py/blob/d3a3ada03e080f39144807c9fbe44876c40e0548/redis/connection.py#L1102C23-L1102C23.
should not be returned in the pool, because it is broken, it should be disconnected from the pool:
await self.disconnect(connection, inuse_connections=True)
actually the self.release(connection) should be called in a sync manner, because if calls async it will endup in some kind of deadlock with another connection release
The text was updated successfully, but these errors were encountered: