# Heap looks fine, pod still OOM killed

DevFeed: [Heap looks fine, pod still OOM killed](<https://devfeed.tech/articles/heap-looks-fine-pod-still-oom-killed-61580.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/60-heap-fine-pod-oom-killed/>)

Author: hello@ankit-rana.com

Published: 2026-09-29T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [heap overflow](<https://devfeed.tech/topics/heap-overflow.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>)

Tags: [container](<https://devfeed.tech/tags/container.md>), [containers](<https://devfeed.tech/tags/containers.md>), [heap](<https://devfeed.tech/tags/heap.md>), [java](<https://devfeed.tech/tags/java.md>), [jit](<https://devfeed.tech/tags/jit.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [memory](<https://devfeed.tech/tags/memory.md>), [oom](<https://devfeed.tech/tags/oom.md>), [socket](<https://devfeed.tech/tags/socket.md>)

## AI overview

A Java service can be killed by the kernel for exceeding its container memory limit even when its heap graph appears healthy. The article explains that memory used by metaspace, thread stacks, the JIT code cache, direct byte buffers and native allocations also counts toward the limit, and that a kernel OOM kill produces no Java exception or stack trace.

## Source excerpt

A container limit applies to the whole process, and the Java heap is only one part of what a JVM allocates. Thread stacks, metaspace, the code cache, direct byte buffers and native allocations inside libraries all live outside the heap and outside every heap graph, so a service can be killed by the kernel while its heap chart shows plenty of headroom. The kill produces no Java exception and no stack trace, because SIGKILL gives the process no opportunity to report anything.