基础学习 · 2023年12月1日 0

OOM KILLER

起因

Sep 24 18:58:38  systemd[1]: x-ui.service: A process of this unit has been killed by the OOM killer.
Sep 24 18:58:38  systemd[1]: x-ui.service: Failed with result 'oom-kill'.
Sep 24 18:58:38  systemd[1]: x-ui.service: Consumed 1d 44min 46.211s CPU time.

Nov 29 21:32:53  systemd[1]: x-ui.service: A process of this unit has been killed by the OOM killer.
Nov 29 21:32:53  systemd[1]: x-ui.service: Failed with result 'oom-kill'.
Nov 29 21:32:53  systemd[1]: x-ui.service: Consumed 14h 45min 14.674s CPU time.
Dec 01 13:36:56  systemd[1]: Started x-ui Service.

处理办法(不推荐生产环境使用)

sysctl -w vm.overcommit_memory=2

echo "vm.overcommit_memory=2" >> /etc/sysctl.conf

参考

参考链接:https://www.vpsee.com/2013/10/how-to-configure-the-linux-oom-killer/