JVM Heap Tuning in Mendix Operator

0
Hi ExpertsOur Mendix app deployed via the Mendix Operator on AKS is hitting OutOfMemoryError under load. The pod has 4GB memory limit set in the CR. How do I correctly tune JVM heap size (-Xms, -Xmx) without the operator overriding my values on the next reconcile loop? I just cross checked in internet and chatgpt and what to know how to this in right way?Thanks in Advance
asked
1 answers
1

Hi Rakesh


The Mendix Operator automatically calculates JVM heap based on the container memory limit by default it sets -Xmx to ~75% of the pod memory. To override this safely, edit the MendixApp CR and add under runtime:

runtime:
  customConfiguration: |
    {
      "JVM_ARGS": "-Xms1g -Xmx3g -XX:+UseG1GC -XX:MaxGCPauseMillis=200"
    }


  • Do NOT set this via environment variables directly the operator will override them on reconcile.
  • Monitor with -XX:+PrintGCDetails piped to a log sidecar to confirm GC pressure patterns.
  • Ensure memory request and limit in the CR are not equal — a small headroom (e.g., request: 3.5Gi, limit: 4Gi) helps avoid OOMKill before the JVM GC can recover.


I just now cross check with my devops guys so kindly check and let me know if it helps


answered