Predis ConnectionException: Connection timed out using on lumen api 5.6

1.9k views Asked by At

I'm using laravel lumen api 5.6.3 for my application. I have also using Redis for my data storage. It's working fine last 2 years and past 10 days I'm getting issue like ERROR:

Predis\Connection\ConnectionException: Connection timed out [tcp://127.0.0.1:6379] in /home/minwin/public_html/winapi/vendor/predis/predis/src/Connection/AbstractConnection.php:155 Stack trace: #0 /home/minwin/public_html/winapi/vendor/predis/predis/src/Connection/StreamConnection.php(128): Predis\Connection\AbstractConnection->onConnectionError('Connection time...', 110) #1 /home/minwin/public_html/winapi/vendor/predis/predis/src/Connection/StreamConnection.php(178): Predis\Connection\StreamConnection->createStreamSocket(Object(Predis\Connection\Parameters), 'tcp://127.0.0.1...', 4) #2 /home/minwin/public_html/winapi/vendor/predis/predis/src/Connection/StreamConnection.php(100): Predis\Connection\StreamConnection->tcpStreamInitializer(Object(Predis\Connection\Parameters))

I have setting in .env like,

BROADCAST_DRIVER=redis

CACHE_DRIVER=redis 
QUEUE_DRIVER=redis

REDIS_HOST=127.0.0.1 
REDIS_PORT=6379

Please help any one to solve this issue.

These response comes while I check grep command for redis,

[root@host ~]# grep timeout /etc/redis.conf read_write_timeout -1 timeout 0 # The following option sets the replication timeout for: # 2) Master timeout from the point of view of slaves (data, pings). # 3) Slave timeout from the point of view of masters (REPLCONF ACK pings). # specified for repl-ping-slave-period otherwise a timeout will be detected # repl-timeout 60 # Cluster node timeout is the amount of milliseconds a node must be unreachable # Most other internal time limits are multiple of the node timeout. # cluster-node-timeout 15000 # (node-timeout * slave-validity-factor) + repl-ping-slave-period # So for example if node-timeout is 30 seconds, and the slave-validity-factor # closing connections of clients in timeout, purging expired keys that are # there are many keys expiring at the same time, and timeouts may be

0

There are 0 answers