advancedScenario & System Design Questions

Spring Boot Pod restarts with OOMKilled

JVM heap exceeded container memory limit. Fix: (1) Increase container memory limit. (2) Add -XX:MaxRAMPercentage=75 so JVM respects the container limit. (3) Verify non-heap (metaspace, direct buffers) is not excessive.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to kubectl apply of a large manifest takes 30+ seconds← Back to all Kubernetes questions