PHP Redis Error: Throw 'RedisException

I am using Redis to create a SNOS iOS application (for a calm api). As more users were used, errors occurred.

Throws out:

Uncaught exception 'RedisException' with message 'read error on connection' in /data1/www/htdocs/11/iossns/Model/Core/Redis.php 

I do not know how to solve the problem.

You can help?

Thanks!

+6
source share
1 answer

What PHP-to-Redis library do you use? Has an official listing from Redis . What is your web server? (Apache, nginx, etc.) How does PHP work? (CGI, FPM, mod_php, etc.)

Heres the thread for the same exception message in phpredis . Turns out phpredis doesn't currently support persistent connections to php-fpm. Version 2.2.3 phpredis has some changes in communication processing that can reduce the frequency of your problems.

I recommend checking your Redis connector configuration for ...

  • disable persistent connections
  • enable reconnection attempts
  • increase log volume

You can also consider the settings (usually increasing) of default_socket_timeout in php.ini.

+1
source

Source: https://habr.com/ru/post/912818/


All Articles