Skip to content

Commit d162e47

Browse files
authored
Merge pull request #1450 from buildkite/fix/prevent-agent-from-oom
fix: make sure buildkite-agent.service is not terminated by OOM
2 parents 0a0d218 + 049eee1 commit d162e47

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packer/linux/conf/buildkite-agent/systemd/buildkite-agent.service

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ RestartForceExitStatus=SIGPIPE
2121
TimeoutStartSec=10
2222
TimeoutStopSec=0
2323
KillMode=process
24+
# https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#OOMScoreAdjust=
25+
# Set to -1000 to disable OOM killing of processes of buildkite-agent service
26+
# managing EC2 instance lifecycle
27+
OOMScoreAdjust=-1000
2428

2529
[Install]
2630
WantedBy=multi-user.target

0 commit comments

Comments
 (0)