Redis Optimization / Tuning ?

HappyWorld

Well-known member
Hello.

I use redis 3.2.6 as cache (with add on).
Redis randomly throws "Redis server went away" error.
Although when i checked process list, i still see redis server is running.
Code:
/usr/local/bin/redis-server 127.0.0.1:6379

I think maybe redis crashed / restarted because of high load / high connection / unoptimized setting.
In my "logfile", i see no sign of crash / restart.

I only modified this redis configuration :
Code:
daemonize yes
port 6379
bind 127.0.0.1
dir  /var/redis/
logfile  /var/log/redis.log
pidfile  /var/run/redis.pid

   save ""

#save 900 1
#save 300 10
#save 60 10000

All others are default.

Is there any clue how to detect the crash (or restart) and fix it?

Thank you.
 
Last edited:
What does /var/log/redis.log have to say?
Hello.

This is my redis log (i cleared the log & restarted redis server) after i restarted my redis server :
Code:
65570:M 22 Dec 05:31:11.042 * Increased maximum number of open files to 10032 (it was originally set to 1024).
                _._                                                  
           _.-``__ ''-._                                            
      _.-``    `.  `_.  ''-._           Redis 3.2.6 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                  
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 65570
  `-._    `-._  `-./  _.-'    _.-'                                  
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                  
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                  
      `-._    `-.__.-'    _.-'                                      
          `-._        _.-'                                          
              `-.__.-'                                              

65570:M 22 Dec 05:31:11.043 # Server started, Redis version 3.2.6
65570:M 22 Dec 05:31:12.005 * DB loaded from disk: 0.961 seconds
65570:M 22 Dec 05:31:12.005 * The server is now ready to accept connections on port 6379

Update : when "Redis server went away" error appears, there is nothing new in redis log.
 
Last edited:
Back
Top Bottom