A service restarts every few seconds; the journal shows `Main process exited, code=killed, status=9/KILL` but nobody runs kill.
AdvancedTroubleshootingsystemd services and journald
Answer
Likely causes → The cgroup memory limit (MemoryMax=) triggers the OOM killer, systemd-oomd kills it under pressure, or a watchdog (WatchdogSec=) timeout expires.
Diagnose →
journalctl -u myapp -b | grep -Ei 'oom|watchdog'
journalctl -u systemd-oomd -b
systemctl show myapp -p MemoryMax -p WatchdogUSec -p NRestarts
dmesg -T | grep -i oom
Fix → Raise or fix the memory limit; if it's the watchdog, make the app send WATCHDOG=1 in time or increase WatchdogSec=.
Prevent → Alert on NRestarts growth and OOM events per unit.
More on systemd services and journald
`systemctl status myapp` shows `Main process exited, code=exited, status=203/EXEC`.BeginnerA service fails with `status=217/USER`.BeginnerA service fails with `status=200/CHDIR`.BeginnerA unit fails with `status=226/NAMESPACE`.AdvancedYou edited a unit file, restarted the service, but the old behaviour persists. `systemctl status` shows `Warning: The unit file, source configuration file or drop-ins of myapp.service changed on disk`.BeginnerYou edited `/usr/lib/systemd/system/nginx.service` directly and after a package update your change vanished.Beginner