Trying to understand this properly before touching anything. The setup: a Spring Boot service in Docker, memory limit 512 MB, and the orchestrator kills it with OOMKilled. There is no OutOfMemoryError in the Java logs.
What I have gathered so far:
✅ modern JVMs read the container limit
✅ -Xmx limits only the heap
✅ there is also -XX:MaxRAMPercentage
Questions:
1. -Xmx or MaxRAMPercentage, and what value?
2. Where does the rest of the memory go if the heap is fine?
3. How do I check what the JVM actually sees inside the container?