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
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.
005391110

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.