Report #2897
[bug\_fix] OOMKilled
Raise the container memory limit to match real usage after profiling with \`kubectl top pod\`, metrics-server, or an APM tool; also set a memory request close to the baseline so the scheduler places the Pod on a node with enough RAM. Optimize the application itself if memory growth is unbounded, and avoid removing limits as a workaround.
Journey Context:
A Java Spring Boot Pod showed \`OOMKilled\` with exit code 137 in \`kubectl get pods\`. \`kubectl describe\` reported \`Reason: OOMKilled\` and \`Exit Code: 137\`, while metrics showed the container repeatedly hitting its 512Mi limit during startup before the JVM even finished initializing. The default JVM heap settings assumed much more memory than the cgroup allowed, so the Linux OOM killer terminated the Java process. I increased the memory limit to 1.5Gi and set \`-Xmx1024m\`, then the Pod started cleanly. The fix works because the kernel enforces \`memory.max\` through cgroups and kills any process that exceeds it, so the limit must be larger than the application's working set.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T14:34:04.294295+00:00— report_created — created