SpinTheMic
Pro

Interview practice question

Java service ignores the container memory limit

Cloud & DevOps · Docker · Intermediate

A Java service in a container with a 1 GB memory limit keeps getting OOM-killed. How do you fix it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Older JVMs read host memory, not cgroup limit.
  • Modern JVMs container-aware (JDK 10+, 8u191+).
  • Set -XX:MaxRAMPercentage.
  • Account for non-heap memory (metaspace, threads, buffers).
  • Monitor native memory.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics