redis服务启动内存不够问题
![](https://s2.loli.net/2022/11/10/An5KBXLNYlODop3.jpg?_r_=01f47dd8-6093-b015-18e6-1405ff632b64)
redis服务启动内存不够问题
Nuyoah在学习redis的时候,每次启动redis都会报错
WARNNG Memory overcommit must be enabled! Without it. a backaround save or replication may fail under low memory
conditon. Being disabled, it can also cause failures without ow memory condition. see https://github.com/jemaloc/jemalloc/issues/1328. To fix this issue add vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysct
vm.overcommit_memory=1’ for this to take effect
问题说的很明显,内存不够,需要在/etc/sysctl.conf文件夹下添加一行代码,该文件为只读文件,需要使用管理员身份来修改
先进入管理员状态
sudo su
然后打开对应文件,添加如下代码,前面没有#
vm.overcommit_memory=1
然后重启虚拟机即可
评论
匿名评论隐私政策
✅ 你无需删除空行,直接评论以获取最佳展示效果