Back to feed
Dev.to
Dev.to
7/14/2026
Fix Docker Exit Code 137 (OOMKilled): Why It Happens and How to Stop It

Fix Docker Exit Code 137 (OOMKilled): Why It Happens and How to Stop It

Short summary

Exit code 137 means SIGKILL — usually the kernel OOM killer, not an app crash. The post walks through confirming the cause via docker inspect and dmesg, distinguishing between container cgroup limits vs host-level memory exhaustion. It covers common root causes including missing memory limits, runtimes that ignore cgroup limits (JVM, Node), and real memory leaks, with practical diagnostic steps using docker stats.

  • Exit 137 = SIGKILL, typically from OOM killer or docker stop timeout
  • Confirm with docker inspect --format OOMKilled and dmesg logs
  • Common fixes: set proper --memory limits, tune runtime heap sizes, profile leaks

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more