小编wat*_*dog的帖子

Redis 警告 必须​​启用内存过量使用

我正在本地 Windows 计算机上托管的 docker 容器上运行我的 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.

Run Code Online (Sandbox Code Playgroud)

有什么方法可以启用此功能吗?

version: '3'
services:
  redis:
    image: "redis"
    ports:
      - "6379:6379"
    networks:
      - my-service

networks:
  my-service:
    external: …
Run Code Online (Sandbox Code Playgroud)

java redis node.js docker docker-compose

7
推荐指数
1
解决办法
7505
查看次数

标签 统计

docker ×1

docker-compose ×1

java ×1

node.js ×1

redis ×1