Docker 运行Redis报错: WARNING overcommit_memory is set to 0!解决方案

2023-07-31 15:02:07 码农 1244

如果docker run redis时,查看日志发现警告:

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.

需要在服务器上执行 sysctl vm.overcommit_memory=1 或者执行一下语句:

echo "vm.overcommit_memory = 1" >> /etc/sysctl.conf \
&& sysctl -p
—— 完 ——
  • (2022-09事业单位联考A类)2、下列关于2022年中国经济上半年运行情况的说法,正确的是()。
  • 使用Docker安装和使用Doccano文本标注平台
  • Which of the following insurance types provide for a loss arising from fraudulent acts by employees?
  • 数位化原型(Digital Prototyping;DP)
  • 2017年11月,在德国柏林召开的第55次ISO/IEC信息安全分技术委员会(SC27)会议上,我国专家组提出的( )算法一致通过成为国际标准。
  • 西门子软件安装时总是提示重启问题的解决方案
  • 电气设备安全运行管理和养护途径
  • C# .NET 域名 Whois 查询代码
  • unity用visual studio写代码的时候一直显示importing assets
  • 怎么写“读者来信”(Letter to the Editor)

© CopyRight 2014~2024 薄学网.