This article is a mirror article of machine translation, please click here to jump to the original article.

View: 20099|Reply: 1

[Redis] Redis will now exit to prevent data corruption. Note that it is...

[Copy link]
Posted on 10/15/2021 9:17:45 AM | | |
When deploying redis on the domestic Kirin operating system, the error is as follows:

12707:M 14 Oct 2021 13:55:36.643 # Server initialized
12707:M 14 Oct 2021 13:55:36.643 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the c
ommand 'sysctl vm.overcommit_memory=1' for this to take effect.12707:M 14 Oct 2021 13:55:36.644 # WARNING Your kernel has a bug that could lead to data corruption during background save. Please upgrade to the latest stable kernel.
12707:M 14 Oct 2021 13:55:36.644 # Redis will now exit to prevent data corruption. Note that it is possible to suppress this warning by setting the following config: ignore-warnings ARM64-COW-BUG

Seeing that the Internet says that you need to set the value of overcommit_memory, execute the command as follows (Not tested):

Because I'm hereThe warning will also be present on the CentOS system, but it will not affect normal boot

vm.overcommit_memory

The default value is: 0

overcommit_memory Parameter description:

Set memory allocation policy (optional, set according to the actual situation of the server)

/proc/sys/vm/overcommit_memory

Optional values: 0, 1, 2

0: Indicates that the kernel will check if there is enough free memory supply for the process; If there is enough free memory, the memory request allows; Otherwise, the memory request fails and returns an error to the application process.
1: Indicates that the kernel allows all physical memory to be allocated regardless of the current memory state.
2: Indicates that the kernel allows allocating more memory than the sum of all physical memory and swap space


My solution

Run the following command, and then rerun redis:

(End)





Previous:docker how to remove a none image
Next:Practical combat: nginx reverse proxy ignores the first-layer path
Posted on 10/16/2021 12:42:37 AM |
Not bad, not bad
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com