1. Error information:
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 command 'sysctl vm.overcommit_memory=1' for this to take effect.
Warning super delegate memory set to 0! Background save may fail under low memory conditions. To solve this problem, change “VM. Overcommit?U= 1 “to/etc/sysctl. Conf, and then restart or run the command” sysctl VM. Overcommit?1 “= 1 “to make it effective
2. Solutions:
In fact, the processing method has been given in the error message. Enter the/etc/sysctl.conf file and add vm.overcommit to the file= 1 to the sysctl. Conf file
There are two ways to do this:
2.1 execute command: echo 1 & gt/ proc/sys/vm/overcommit_ Memory, you may not be able to execute the command with ordinary users, so you can directly Su root and use the root user to execute the command. The advantage of this command is that it takes effect directly and does not need to restart the redis service. The disadvantage is that if the redis service is restarted, the error will continue to be reported and the above command needs to be executed again
root@iZbp1bz2wge6lwlpy5kw8sZ:/var/log/redis # sudo echo 1 > /proc/sys/vm/overcommit_memory
2.2 enter the/etc/sysctl.conf file and add vm.overcommit= 1. After restart, the error will disappear; The advantage of this method is that no matter how to restart the redis service in the future, the error will not be reported again. The disadvantage is that it can’t take effect immediately and must restart the redis service
vm.overcommit_memory=1
Thinking:
In the future, you can check the error log of redis, which is generally located at/var/log/redis/redis-server.log. If you don’t record the log file, you can enter the configuration file of redis and add logfile logfilepath. Note that the log file must have write permission
# Specify the log file name. Also the empty string can be used to force
# Redis to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
logfile /var/log/redis/redis-server.log
Similar Posts:
- Redis service failed to start, prompt: redis server: command not found
- max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
- ERROR: Unable to start the RMI connector for NodeAgent (ArcGIS Server Startup Error)
- [Solved] ERROR: bootstrap checks failed memory locking requested for elasticsearch process but memory is not locked
- Error reported in the celery log of the project: redis.exceptions.connectionerror failed to connect with redis
- [Solved] Redis Connect Error: ERR Client sent AUTH, but no password is set
- [Solved] Elasticsearch Startup Error: node validation exception
- Elasticsearch startup error, bootstrap checks failed [How to Solve]
- Elasticsearch startup error, bootstrap checks failed