Discourse 本地测试环境开发的内存警告

当运行 sudo sysctl vm.overcommit_memory=1 提示内存低的警告。

529198:C 17 Oct 2025 08:16:25.856 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it 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.

解决方案

运行:sudo sysctl vm.overcommit_memory=1

重新启动后无警告。