In card 1 the heap stops at the red limit line before the dashed 1.2GB goal; in card 2 an 800MB heap crosses it once counted as RSS 600MB live · GOGC=100 · 1GB limit The heap hits the limit before the GC goal 1The GC goal sits above the limit1GB limitlive 600MBgoal 1.2GB new ✕ OOMKilled before the GC runs 2RSS is bigger than the heapHeap Go sees1GB limitheap 800MBRSS the kernel seesheap 800MBgoroutine stacks · runtime metadatapages not yet returned to the OSProportions are illustrative Go · ConceptsGo GOMEMLIMIT and GOGCOOMKilled with an 800MB heapThe container limit was 1GB, yet the process was OOMKilled with an 800MB heap. Go has a garbage collector, so how did memory run out?Sep 21, 2026