linux redis启动时报错WARNING overcommit_memory is set to 0! Background save may fail under low memory con

报错: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.

翻译为:【“警告超限”内存设置为0!在内存不足的情况下,后台保存可能会失败。若要解决此问题,请将“vm.overcommit_memory=1”添加到/etc/sysctl.conf,然后重新启动或运行命令“sysctl vm.overcommit_memory=1”以使其生效。】

解决是:
vi /etc/sysctl.conf
然后添加:vm.overcommit_memory=1 然后退出按Esc+:wq
重新启动或运行命令“sysctl vm.overcommit_memory=1”以使其生效。

你可能感兴趣的:(linux,redis)