Hello.
I have an issue with redis on CentOS 6.4 that started today after system power failure:
redis service is not working with message on service restart: redis-server dead but pid file exists
I have tried to remove the .pid file, lock file, reboot server, reinstall redis, flushall from cli,.. but sadly nothing worked for me and I stil get this message on service start:
# service redis restart
Stopping redis-server: [FAILED]
Starting redis-server: [ OK ]
# service redis status
redis-server dead but pid file exists
if I run redis-server everything works just fine.
What could cause that?
Thank you in advance,
Check the log if it says anything about this. Most likely Redis crashed somehow.
Try rm /var/run/redis_6379.pid.
I am not sure, backup before rm. :-)
Thank you guys!
@sunheehnus - No such file exist. only /var/run/redis/redis.pid and I've tried rm it.
@badboy - my /var/log/redis.log file has: Short read or OOM loading DB. Unrecoverable error, aborting now. using those instructions, I've tried:
mv /etc/dump.rdb /etc/dump.rdb.backup
mv /var/lib/redis/dump.rdb /var/lib/redis/dump.rdb.backup
And restarted redis service.. now everything works back as normal!. thank you!!
Yes, using the redis error.log is helpful. It asked me to add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then restart.
After that I rm the dump.rdb and now it works too.
Thanks
Most helpful comment
Thank you guys!
@sunheehnus - No such file exist. only /var/run/redis/redis.pid and I've tried rm it.
@badboy - my /var/log/redis.log file has:
Short read or OOM loading DB. Unrecoverable error, aborting now. using those instructions, I've tried:And restarted redis service.. now everything works back as normal!. thank you!!