Java Pod OOME Killer after migration from OCP 3.9 to OCP 3.11

Solution Verified - Updated

Environment

  • OpenJDK 8
  • Red hat OpenShift Container Platform (OCP)
    • 3.9
    • 3.11

Issue

After migration from OCP 3.9 to OCP 3.11 the application is not starting with OOME Killer.

Resolution

Usually the OOME-Killer acts when there is not enough memory on the pod for the process to function properly.
See solution How to change JVM memory options using Red Hat JBoss EAP image for Openshift for more information on the flags and tuning suggestion.
For Java memory consumption details in a container see Java's memory consumption inside a Openshift 4 container and for Java tuning suggestions, see solution Java Tuning on OpenShift.

Diagnostic Steps

  • Verify the Deployment Configuration and the flags JAVA_INITIAL_MEM_RATIO and JAVA_MAX_MEM_RATIO, which set the percentage of occupancy for the heap. Avoiding percentages too high, because besides the heap, the JVM has an off-heap part, which generally takes 50% of the JVM total memory.
- name: JAVA_INITIAL_MEM_RATIO
  value: '100'
- name: JAVA_MAX_MEM_RATIO
  value: '100'
  • Verify if the Swap mechanism is enabled, this mechanism can mask that part of the JVM memory that is taken more than 100% of the POD memory by sending it to the hard drive.
Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.