Answer the question
In order to leave comments, you need to log in
Redis - why data disappears?
Good afternoon
I set up a server with Redis according to this instruction.
Everything works stably, but once a day, for some reason, all the data disappears. They just rub off. And then writing the database (redis-cli save) is not possible. Error and all.
If you restart redis at this moment, all data will be erased and the recording will start again, without problems.
There are no errors in the logs. The dump file is written, until some point, until an error occurs.
I didn't set a memory limit. In total, the server has 16GB of RAM.
What could be the problem?
Is there any setting in redis to tell it to never wipe data?
Answer the question
In order to leave comments, you need to log in
Maybe such a memory? Check it for buggy, Linux allows this without rebooting.
TL;DR: there is a "save" directive and "append only mode".
The first - makes dumps depending on the number of commands for a period of time.
The second one writes all the executed commands to a file, from which, when restarted, it will execute everything in order to return the most approximate replica.
Details: redis.io/topics/persistence
Your problem: the default settings of the save directive do not suit your application.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question