Skip to main content
AllDevToolsHub
Back to error codes
ERROR Exit 137

Docker Container Exit Code 137 (OOM Kill)

Docker Error

The container was killed by the Linux OOM (Out of Memory) killer.

Root Cause

The container exceeded its memory limit and was killed by the kernel. Exit code 137 = 128 + 9 (SIGKILL).

How to Fix

Increase the container's memory limit: docker run -m 512m. Optimize the application's memory usage. Check for memory leaks.

Quick Summary

Exit code 137 means the container was OOM-killed (out of memory). Increase the memory limit with -m or --memory, or fix memory leaks in the application.

Key Takeaways

Key Takeaways

  • Exit 137 = 128 + SIGKILL (9) = OOM kill
  • The container exceeded its memory limit
  • Increase limit: docker run -m 512m or in docker-compose: mem_limit: 512m
  • Check for memory leaks with a profiler
Use Cases

When to use it

  • Node.js app with a memory leak
  • Java app with insufficient heap size
  • Container memory limit too low for the workload
Watch out

Common Mistakes

  • Increasing the memory limit without investigating the root cause, fix the memory leak instead
FAQ

Exit 137 Docker Container Exit Code 137 (OOM Kill), Frequently Asked

How do I check if a container was OOM-killed?

docker inspect <container-id> | grep OOMKilled, returns true if the container was OOM-killed.

Still having issues?

Check your network logs or use our developer tools to inspect headers, decode tokens, or validate your requests.