Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redis returns an error when attempting to save

Tags:

redis

nosql

When running the SAVE command in redis-cli for Redis 1.3.15 it just returns "(error) ERR", BGSAVE does not appear to do anything either. The SHUTDOWN command returns "(error) ERR Errors trying to SHUTDOWN. Check logs.". Killing the Redis process and starting Redis again does not change the save error.

Naturally I have tried to check the logs, but I havent been able to find any. Any hints where I can find the logs or what might be the problem would be greatly appreciated.

like image 783
Andreas Avatar asked Aug 19 '10 19:08

Andreas


People also ask

How do you handle Redis failure?

If the Redis server becomes unavailable you must flush it (clean out the entries) before making it available again. Otherwise there's a chance that you might start retrieving cache entries that have incorrect data because of updates that occurred in the meantime.

What is Misconf Redis?

MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error. It means that Redis is not able to save data on the disk. This error occurs because of BGSAVE being failed.

How do I reset Redis cache?

To clear data of a DCS Redis 4.0 or 5.0 instance, you can run the FLUSHDB or FLUSHALL command in redis-cli, use the data clearing function on the DCS console, or run the FLUSHDB command on Web CLI. To clear data of a Redis Cluster instance, run the FLUSHDB or FLUSHALL command on every shard of the instance.

What is Bgsave in Redis?

Redis BGSAVE command saves the DB in the background. The OK code is immediately returned. Redis forks, the parent continues to serve the clients, the child saves the DB on the disk, then exits. A client may be able to check if the operation succeeded using the LASTSAVE command.


1 Answers

to check where the log files are located you should check the redis.conf file.

If BGSAVE or SAVE are failing there is maybe a problem with permissions of directory or alike, this kind of problems will be reported in the log file of course.

like image 134
antirez Avatar answered Oct 05 '22 17:10

antirez