Memory climbs steadily over days
Your task
Every few days, one or two pods of your notification service get OOM-killed and restart; lately it's getting more frequent. The memory dashboard shows a slow, steady sawtooth: each pod's heap climbs roughly linearly over ~3 days from 400MB to its 2GB limit, then OOMs and resets. Traffic is flat and there's no daily spike, the climb is independent of load. GC is running but reclaiming less and less over time (the post-GC baseline keeps rising). The last meaningful deploy was 10 days ago, which added an in-process LRU-ish cache for rendered email templates and a per-request metrics tagger. No single request is slow. How do you diagnose and fix a leak like this?
It covers
- Memory leak
- Slow degradation
- Oom