Report #4433
[bug\_fix] OOMKilled
Inspect \`kubectl describe pod\` for \`Reason: OOMKilled\` and \`Exit Code: 137\`. Increase \`resources.limits.memory\` and \`resources.requests.memory\` so the scheduler places the Pod on a node with enough RAM and the cgroup limit is not hit. For JVM workloads, set heap as a percentage of container memory \(e.g. \`-XX:MaxRAMPercentage=75.0\`\) instead of pinning \`-Xmx\` equal to the limit, because native memory, metaspace, code cache, and thread stacks also consume RAM.
Journey Context:
A Java batch job completed small datasets fine but was killed midway through large imports. \`kubectl describe pod\` showed \`Last State: Terminated, Reason: OOMKilled, Exit Code: 137\`. \`kubectl top pod\` showed working-set memory pressing against the 512 Mi limit. The manifest had set \`-Xmx=512m\` equal to the container limit, so JVM overhead pushed the cgroup over the limit. Raising the limit to 1 Gi and switching to \`-XX:MaxRAMPercentage=75.0\` with capped non-heap flags stopped the OOM kills.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:29:34.773490+00:00— report_created — created