From fcd0db089de1ecf82f22320e2cc444f8cf7feaed Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Fri, 23 Jul 2021 11:13:48 +0200 Subject: [PATCH] Use health_check_interval which was introduced in redis_py >= 3.3. It helps with keeping connections alive and to provent the ServerConnection errors. --- gnocchi/common/redis.py | 2 ++ setup.cfg | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gnocchi/common/redis.py b/gnocchi/common/redis.py index 8607aab85..c0bf6e82b 100644 --- a/gnocchi/common/redis.py +++ b/gnocchi/common/redis.py @@ -36,6 +36,7 @@ CLIENT_ARGS = frozenset([ 'db', 'encoding', + 'health_check_interval', 'retry_on_timeout', 'socket_keepalive', 'socket_timeout', @@ -62,6 +63,7 @@ #: Client arguments that are expected to be int convertible. CLIENT_INT_ARGS = frozenset([ 'db', + 'health_check_interval', 'socket_keepalive', 'socket_timeout', ]) diff --git a/setup.cfg b/setup.cfg index 7b689e96a..da0090874 100644 --- a/setup.cfg +++ b/setup.cfg @@ -69,7 +69,7 @@ s3 = boto3 botocore>=1.5 redis = - redis >= 3.2.0 # MIT + redis >= 3.3.0 # MIT hiredis swift = python-swiftclient>=3.1.0