Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fatal error: Uncaught exception 'RedisException' with message 'Redis server went away'

One of my application suddenly started to give error:

Fatal error: Uncaught exception 'RedisException' with message 'Redis server went away' in /var/www/_slim/_core/system/generator.001.php:133 Stack trace: #0 /var/www/_slim/_core/system/generator.001.php(133): Redis->auth('77B1BFFBC0378DF...') #1 /var/www/_slim/_core/system/generator.007.php(144): Generator001->r6_redis_start('R') #2 /var/www/_slim/_core/system/generator.007.php(26): Generator007->HarvestRedis() #3 /var/www/_slim/_core/system/generator.shopping.php(14): Generator007->Generator007() #4 /var/www/_slim/_core/system/generator.last.php(43): Generator008->Generator008() #5 /var/www/_slim/site/home/php/index.php(16): GeneratorLast->GeneratorLast() #6 /var/www/index.php(96): Gui->Gui()
#7 {main} thrown in /var/www/_slim/_core/system/generator.001.php on line 133

I have reinstalled redis-server but no luck so far. Any suggestions?

like image 776
Dipak G. Avatar asked Jul 27 '14 20:07

Dipak G.


2 Answers

Maybe not the answer to the specific question, but might help those new to Redis who come here by googling the Exception.

You will also get this exception if you create a Redis instance and start to call methods on it without first connecting to a Redis server by calling

$redis->connect('localhost')

The arguments for the call should obviously be adjusted if Redis is not a local host, configured to listen on a different port, set up a password etc.

like image 66
Okneloper Avatar answered Sep 30 '22 06:09

Okneloper


Well, as the exception describes itself, your Redis server is down.

Try the following stuff:

  1. See if the server that runs the Redis instance contains any firewall on (iptables, maybe?).
  2. Go to your web server (that runs your php) and try to telnet to your redis server.
  3. See if the configured host/ip is correct. Maybe something in the network settings of the Redis server have been changed.
like image 45
Michael Arenzon Avatar answered Sep 30 '22 04:09

Michael Arenzon