WARNING Memory overcommit must be enabled! Without it..问题处理


文章目录

  • 一、问题出现
  • 二、解决方式
  • 三、补充其它


一、问题出现

redis容器方式启动报错

 WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. 
 Being disabled, it can can also cause failures without low memory condition, 
 see https://github.com/jemalloc/jemalloc/issues/1328. 
 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文件,无法处理。

二、解决方式

容器启动后进入容器执行一下操作处理警告 完成并重启服务即可

echo "1" > /proc/sys/vm/overcommit_memory

三、补充其它

	apt install redis-tools
	执行恢复

 	redis-check-aof --fix appendonly.aof.10.incr.aof 
	cp appendonly.aof appendonly.aof.bak
	redis-check-aof --fix appendonly.aof
	redis-check-aof --fix appendonly.aof.776.incr.aof

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