Loading

RTF Agent OOMKilled on Linux Kernel 6.12 Due to JVM Heap Miscalculation, Causing Deployments to Remain in Applying State

Publiceringsdatum: Aug 17, 2026
Beskrivning

On nodes with large RAM (e.g. 20 GB), the JVM sets a heap ceiling of ~20 GB against a container limit. The Linux kernel OOM-kills the container as soon as the JVM grows past the container limit, causing repeated agent pod restarts (exit code 137, OOMKilled).

When the agent crash-loops, deployment commands dispatched by Anypoint Platform are never consumed, and application deployments remain stuck in the 'Applying' state indefinitely.

This is a known OpenJDK defect in which HotSpot's cgroup memory detection silently regresses on kernel 6.12, causing the JVM to fall back to host RAM for heap sizing.

Check agent pod logs to verify the Max Heap Size:

kubectl logs -n rtf agent-xxx -c app

Max. Heap Size (Estimated): 19.96G

Using VM: OpenJDK 64-Bit Server VM

Lösning

Add an explicit heap size flag to the RTF agent JVM options to bypass the broken auto-detection using the steps below:

kubectl edit deployment -n rtf agent

Add the following environment variable under spec.containers for 'app' container:

env:

 - name: JAVA_TOOL_OPTIONS

 value: "-Xmx250m"

 

After editing, the section must look like this:

 

spec:

 containers:

 - env:

  - name: PROXY_HTTP

   valueFrom:

    secretKeyRef:

     key: HTTP_PROXY

     name: custom-properties

     optional: true

  - name: PROXY_NOPROXY

   valueFrom:

    secretKeyRef:

     key: HTTP_NO_PROXY

     name: custom-properties

     optional: true

  - name: FIPS_ENABLED

   value: "false"

  - name: JAVA_TOOL_OPTIONS

   value: "-Xmx250m"

 

Save and restart the agent pod.

Monitor the agent pod startup logs to confirm that the Max Estimated Heap Size is in M and not G. For example:

 

Generating temporary keystore...

Success: Keystore generated using standard OpenSSL.

VM settings:

  Max. Heap Size (Estimated): 121.81M

  Using VM: OpenJDK 64-Bit Server VM

 

NOTE:

Setting an explicit value overrides the JVM's container-detection logic entirely. Choose a value appropriate for your agent container's memory limit (e.g. <code>-Xmx512m</code> for a 1000Mi container). Use an absolute -Xmx value, not -XX:MaxRAMPercentage. If the container limit is changed, scale -Xmx to ~50% of the new limit.

Knowledge-artikelnummer

005391110

 
Laddar
Salesforce Help | Article