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

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

如果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
—— 完 ——
  • Redis持久化机制
  • The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
  • 2018年10月,含有我国SM3杂凑算法的IS0/IEC10118-3: 2018《信息安全技术杂凑函数第3部分:专用杂凑函数》由国际标准化组织(ISO)发布
  • SQL Server 存储过程之SET NOCOUNT ON/OFF 含义
  • 泵站安全运行管理
  • 【201305-操作56】在 MapGIS 6.7 基础平台软件中,以下描述不正确的是:
  • 【201305-单选16】GIS 数据规范化和标准化直接影响地理信息共享,地理信息系统空间位置建立的基础是:
  • CentOS 7系统镜像下载与安装
  • C#中List〈string〉和string[]数组之间的相互转换
  • Docker启动报错:Docker Desktop - WSL distro terminated abruptly

© CopyRight 2014~2024 薄学网.