docker ps -a shows exit code 137.
128 + signal_number. In this case:
- 137 = 128 + 9

- The kernel’s OOM (Out‑Of‑Memory) killer.
- Docker itself (for example, after a
docker stopgrace period times out). - Orchestrators like Kubernetes (kubelet follows a SIGTERM → grace period → SIGKILL pattern).
- Systemd on some hosts.
- A person running
docker kill <container-id>.


- Inspect the container state for the
OOMKilledflag. - Check kernel logs (
dmesgorjournalctl -k) for OOM messages.
OOMKilled: true or an “Out of memory: Killed process” line in kernel logs, the OOM killer was responsible for the SIGKILL.
If there’s no OOM evidence, consider other common causes:
- Docker after
docker stop: Docker sends SIGTERM, waits the stop timeout (default 10s), then escalates to SIGKILL. - Orchestrator termination: Kubernetes/other orchestrators use SIGTERM then SIGKILL after the pod’s termination grace period.
- Manual intervention: someone executed
docker kill.

Best-practice checklist when you see Exited (137)
- docker inspect
<id>: look for"OOMKilled": true. - Check kernel logs:
dmesgorjournalctl -kfor OOM messages. - Examine Docker events:
docker events --filter 'container=<id>' --since '10m'. - Review orchestrator logs (kubelet, controller manager, etc.) for stop/kill actions.
- Confirm memory limits on the container and review memory metrics leading up to the failure.
- If needed, reproduce the issue while collecting memory and process metrics to pinpoint the root cause.
If you see
Exited (137) but no OOMKilled flag and no kernel OOM messages, focus your investigation on orchestrator logs or manual actions (e.g., docker kill). Don’t assume OOM without confirming the kernel logs.Avoid treating 137 as an application bug by default; it indicates an external kill. Only investigate application-level causes (crashes, segfaults) after ruling out external signals and resource limits.