From e89a87152822d240df04fe6d315608ab75e0b0db Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 21 Oct 2020 21:52:52 +0300 Subject: [PATCH] Fix for redis persistent connection --- app/init.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/init.php b/app/init.php index 9637c4381..d44039ec2 100644 --- a/app/init.php +++ b/app/init.php @@ -166,8 +166,8 @@ $register->set('statsd', function () { // Register DB connection }); $register->set('cache', function () { // Register cache connection $redis = new Redis(); - $redis->pconnect(App::getEnv('_APP_REDIS_HOST', '', 2.5), - App::getEnv('_APP_REDIS_PORT', '')); + $redis->pconnect(App::getEnv('_APP_REDIS_HOST', ''), App::getEnv('_APP_REDIS_PORT', '')); + $redis->setOption(Redis::OPT_READ_TIMEOUT, -1); return $redis; });