From 53b5d063e92f18ebfdb5597a0f7f8be213c01da9 Mon Sep 17 00:00:00 2001 From: Christophe de Dinechin Date: Fri, 13 Nov 2020 11:10:19 +0100 Subject: [PATCH] agent: Adjust OOM Score to avoid agent being killed. Under stress, the agent can be OOM-killed, which exists the sandbox. One possible hard-to-diagnose manifestation is a virtiofsd crash. Fixes: #1111 Reported-by: Qian Cai Signed-off-by: Christophe de Dinechin --- src/agent/kata-agent.service.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/agent/kata-agent.service.in b/src/agent/kata-agent.service.in index c0541b440d..91dc7f5c8d 100644 --- a/src/agent/kata-agent.service.in +++ b/src/agent/kata-agent.service.in @@ -20,3 +20,5 @@ LimitNOFILE=infinity # the runtime handles shutting down the VM. ExecStop=/bin/sync ; /usr/bin/systemctl --force poweroff FailureAction=poweroff +# Discourage OOM-killer from touching the agent +OOMScoreAdjust=-997