Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Short read or OOM loading DB. Unrecoverable error, aborting now

After restating my server I am not able to start the redis. From the log I found this message "Short read or OOM loading DB. Unrecoverable error, aborting now.". I am new to redis and don't know what to do to resolve the issue. Also I am not able to find any solid solution for this. Please help

like image 893
linuxnewbee Avatar asked Oct 31 '13 07:10

linuxnewbee


2 Answers

Warning: This will permanently delete your database. Use only if you don't care about the data stored or if you have a backup.

I solved the problem like this:

rm -rf /var/lib/redis/dump.rdb
rm -rf /var/run/redis.pid
service redis-server start

Then it is OK.

like image 90
Cola Avatar answered Nov 15 '22 20:11

Cola


Cause of this error might be similar to a known one.

Your disk is full so when redis tries to create a db file it fails because there is no space left on the disk and it creates zero sized db file. Starting redis fails because of zero sized db file, in CentOS db file path is like this

/var/lib/redis/dump.rdb

In newer versions of redis this bug is fixed, if you use older version of redis simply removing dump.rdb will work for you. But do this if dump.rdb file size is zero, otherwise do not because you might lose data.

like image 26
denizeren Avatar answered Nov 15 '22 19:11

denizeren