OOMKilled
This document explains the OOMKilled error in Kubernetes — how to identify, confirm, troubleshoot, and prevent it in production environments.
1. What Is OOMKilled?
OOMKilled occurs when a container uses more memory than its configured limit and is forcibly terminated by the Linux kernel.
- Kubernetes does not kill the container
- The kernel kills it to protect the node
- Kubernetes only reports what happened
2. What OOMKilled Does NOT Mean
OOMKilled does not mean:
- Kubernetes crashed
- The application exited normally
- There was a code exception
It strictly means: Memory limit was exceeded
3. Where OOMKilled Happens (Flow)
- Pod starts normally
- Memory usage increases
- Memory limit is crossed
- Linux kernel kills the process
- Container exits with code
137 - Pod shows
OOMKilled
4. Common Production Causes
| Cause | Description |
|---|---|
| Memory leak | Application never releases memory |
| Low memory limits | Limits set lower than real usage |
| Incorrect requests | Requests much lower than actual usage |
| JVM / Node / Python | No heap or memory tuning |
| Traffic spikes | Sudden increase in load |