Report #97176
[bug\_fix] OOMKilled: container killed by the Linux OOM killer
Increase the container's \`resources.limits.memory\` \(and \`requests.memory\` proportionally\) after profiling actual usage, or reduce the application's memory footprint. Do not rely on swap; Kubernetes disables swap by default. Inspect \`kubectl describe pod\` for the exit code 137 and \`kubectl top pod\` to see live memory usage. Tune JVM/Node/Python heap settings if the runtime reserves more than the limit.
Journey Context:
A Java pod dies around the same time every day with status \`OOMKilled\`. \`kubectl describe pod\` shows \`Last State: Terminated, Reason: OOMKilled, Exit Code: 137\`. The memory limit is set to 512Mi but the JVM was started with no \`-Xmx\`, so it defaults to roughly 1/4 of the host's RAM and balloons until the cgroup kills it. The developer first suspects a memory leak and spends hours heap-dumping, but the real issue is the limit is simply too low for the workload. Raising the limit to 2Gi and setting \`-XX:MaxRAMPercentage=75.0\` makes the pod stable. In a Node.js case, the app streams large files into buffers; refactoring to streams drops resident memory below the limit. The lesson is that exit code 137 with OOMKilled means the cgroup limit was breached, not necessarily a leak.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T04:40:35.268480+00:00— report_created — created