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.
时间: 2023-04-15 11:03:10 浏览: 93
警告:overcommit_memory被设置为!在内存不足的情况下,后台保存可能会失败。为了解决这个问题,请将“vm.overcommit_memory = 1”添加到/etc/sysctl.conf中,然后重新启动或运行命令“sysctl vm.overcommit_memory = 1”使其生效。
相关问题
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.
这是一个系统警告,意味着内存不足可能会导致后台保存失败。为了解决这个问题,需要将'vm.overcommit_memory = 1'添加到/etc/sysctl.conf中,然后重新启动或运行命令'sysctl vm.overcommit_memory=1'。
Memory overcommit must be enabled! Without it, a background save or replication may fail under low m
在Redis容器启动时,如果没有启用内存超额提交(Memory overcommit),在低内存条件下可能会导致后台保存或复制失败。为了解决这个问题,您可以按照以下步骤进行操作:
1. 编辑`/etc/sysctl.conf`文件,添加以下行:
```
vm.overcommit_memory = 1
```
2. 保存并关闭文件。
3. 重新启动系统,以使更改生效;或者,您可以运行以下命令使更改立即生效:
```
sysctl vm.overcommit_memory=1
```
这样,通过调整`vm.overcommit_memory`设置,您可以确保Redis在执行内存密集型操作时不会因为内存不足而失败。