I
I
Ivan Karpilovich2015-06-09 21:35:27
PHP
Ivan Karpilovich, 2015-06-09 21:35:27

What is the problem with "read error on connection" error in Redis?

With a relatively light load (1000 requests per second), Redis SOMETIMES throws the following message:
[09-Jun-2015 20:57:31] PHP Fatal error: Uncaught exception 'RedisException' with message 'read error on connection' in .../ classes/Stash/Driver/Redis.php:272
Redis version: 2.6.16
In redis.conf setting timeout = 0
In php.ini setting default_socket_timeout = 60

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
egor_nullptr, 2015-06-09
@egor_nullptr

The fact is that when Redis is saving the dump to disk, it does not respond to external influences. Somewhere in issues on github you can find a detailed description. The problem lies in the fsync system call, the OS's copy-on-write approach, and the magic combination of this in Redis. The way out and the solution: create a slave for Redis, on which to do a periodic dump (option save), and disable save on the master altogether.

N
notcommon, 2020-11-13
@notcommon

My laravel didn't want to connect to radish raised on digitalocean. Adding a setting to the database.redis.default config helped. scheme='tls'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question