Exit 137 vs 143
137 usually means SIGKILL (OOM or a supervisor), 143 means SIGTERM. The code narrows the story before you read logs.
A unit that restarts every few seconds hides the cause. systemctl status gives you the exit code; the OOM killer and the cgroup limit tell you whether the process crashed or was killed.
137 usually means SIGKILL (OOM or a supervisor), 143 means SIGTERM. The code narrows the story before you read logs.
dmesg | grep -i oom and journalctl -k name the killed process and the cgroup.
systemctl show <unit> -p MemoryMax and the slice limits decide when the kernel steps in.
Rate-limit restarts and capture the first failure; a loop overwrites the evidence you need.
| Command | What it shows |
|---|---|
| systemctl status <unit> | Exit code, restart count, last start time. |
| journalctl -u <unit> -n 200 --no-pager | The last failure, before the loop overwrites it. |
| dmesg -T | grep -i -E "oom|killed process" | Kernel OOM kills with timestamps. |
| systemctl show <unit> -p MemoryMax -p MemoryCurrent | Configured limit vs current usage. |
Raising MemoryMax without understanding the leak just moves the kill to the host. Check resident-memory growth, connection pools and cache sizes first; then set the limit and the alert together.
This page is free. The paid runbooks cover the operational failures around it, with detection commands, five failure modes and a migration checklist.