-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Hi,
I have a redis server hosted on Azure (Azure Redis PaaS). From time to time, I have connection error to this server with py-redis. From the network capture I have made with tcpdump, py-redis don't seems to respond to the server asking to drop the connection. It only respond to keepalive packets sent by the server. Finnnaly, the connection is dropped by the server with RST packet. I think the socket is broken on py-redis side but still stays in the connection pool. And when py-redis try to reuse it, an error redis.exceptions.ConnectionError is thrown because the socket is broken.
Until commit acac4db, I think py-redis used selector to handle network events. But since then, I don't think their is something in the code to handle network events like disconnection.
Issue is related to #3509.
For now, I think I can use retry_on_error to reconnect after ConnectionError but might be worth to implement a real fix.
