docker ps -a shows Exited (137); dmesg shows oom-kill.
The kernel OOM killer stopped the container (or docker stop timed out).
dmesg | grep -i "killed process"docker stats --no-streamdocker run -m 1g ...while true; do ps -o rss= -p <pid>; sleep 5; doneSet memory limits deliberately and alert at 80% of the limit, not at the crash.
Full walkthrough: Docker Exit Code 137: OOMKilled, Explained on the NinjaOps blog.
Spinning up a fresh box to reproduce or escape this error?
Servers with headroomNinjaOps publishes free engineering guides. Some outbound links are affiliate links: they cost you nothing and support the site.
Last reviewed 2026-10-02 · NinjaOps SEO grid · DevOps blog