redis保存數據出錯處理方法:在/etc/sysctl.conf配置文件中,添加:“vm.overcommit_memory = 1”,保存配置,重啟redis即可。
redis保存數據出錯的解決方法:
問題:Redis “MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk”
查看日志出現提示信息如:
“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.”
解決方法:
在/etc/sysctl.conf配置文件中,添加:“vm.overcommit_memory = 1”,保存配置,重啟redis即可。