Direct memory leak in Netty streaming responses
Your task
A Java gRPC service (Netty transport) gets OOMKilled by Kubernetes every ~18 hours despite a stable, healthy JVM heap: heap-used oscillates around 2GB under an -Xmx4g and never trends up, full GCs are rare, but container RSS climbs steadily to the 8Gi limit and the pod dies with exit 137. The Netty 'usedDirectMemory' metric trends upward over the life of the pod. A streaming-response feature shipped two weeks ago. Triage and fix.
It covers
- Native memory
- Off heap
- Direct buffers