diff --git a/redis/connection.py b/redis/connection.py index 00d293a238..c6a22aae76 100644 --- a/redis/connection.py +++ b/redis/connection.py @@ -513,7 +513,10 @@ def read_response( self.next_health_check = time() + self.health_check_interval if isinstance(response, ResponseError): - raise response + try: + raise response + finally: + del response # avoid creating ref cycles return response def pack_command(self, *args):