Skip to content

Scaling the Java heap

The Orchestrator server is a Java application, and everything a workflow holds while it runs, from a list of 5,000 VMs to a large JSON response, sits in its Java heap. When the heap fills up, the server stops answering, its pod restarts, and every running workflow is interrupted. This recipe shows how to recognise that, and how to give the server a bigger heap on a standalone appliance. On an Orchestrator embedded in VCF Automation, the log paths, the pods and what you can change are different: see On an embedded Orchestrator under There’s more.

Getting ready

  • A standalone appliance or cluster and a root shell on each node: SSH in as vmware-system-user, then sudo su - (recipe 2.1).
  • Permission to change the appliance VM’s memory in the vSphere Client.
  • A snapshot of every node, taken as in recipe 2.6, and a maintenance window. Step 7 restarts all of Orchestrator’s services.

How to do it

  1. Confirm the heap is the problem. Look for out-of-memory errors in the server log, and for Orchestrator pods with a high restart count:
root@vco01
grep -c "java.lang.OutOfMemoryError" /services-logs/prelude/vco-app/console-logs/vco-server-app.log
kubectl -n prelude get pods | grep vco-app
Needs a lab check. These two commands haven’t been run on a standalone 9.1.1 appliance yet. Check that the server log is at this path there: on an embedded 9.1.1 Orchestrator the same log is at /var/log/services-logs/prelude/vco-app/file-logs/vco-server-app.log, and there’s no console-logs folder.

If the count is above zero, or the RESTARTS column for vco-app keeps climbing, carry on. If not, look elsewhere first: slow plug-in endpoints and long-running scripts look similar from the client.

  1. Decide on the new size. Note the current settings and the VM’s memory, so you can work out how much to add. On 9.1 the server’s memory is set by three values:

    Value Default What it does
    serverMemoryLimit 4.4G The most memory the Orchestrator server container may use
    serverMemoryRequest 3.2G The memory Kubernetes reserves for it
    serverJvmMaxRamPercentage 40 The share of the container’s limit that Java may use as heap

    The heap is the percentage of the limit, so the default heap is 40% of 4.4 GB, about 1.8 GB. In this recipe you raise the limit to 8G and the percentage to 50, for a 4 GB heap.

  2. Add memory to the VM first. Shut down the appliance from its console with shutdown -h now, or with Power > Shut Down Guest OS in the vSphere Client. Add at least as much memory as you’re adding to serverMemoryLimit (here, 8 − 4.4 ≈ 4 GB, so 12 GB becomes 16 GB), then power the VM on and wait until all pods are Running.

  3. Create a custom profile. A profile is a folder of settings that the appliance applies over its defaults every time it deploys its services. Create one with a check script that always says “yes, apply me”:

root@vco01
mkdir -p /etc/vmware-prelude/profiles/custom-profile/helm/prelude_vco
cat > /etc/vmware-prelude/profiles/custom-profile/check <<'EOF'
#!/bin/bash
exit 0
EOF
chmod 755 /etc/vmware-prelude/profiles/custom-profile/check
  1. Write the new memory settings into the profile:
root@vco01
cat > /etc/vmware-prelude/profiles/custom-profile/helm/prelude_vco/90-resources.yaml <<'EOF'
serverMemoryLimit: 8G
serverMemoryRequest: 6G
serverJvmMaxRamPercentage: 50
EOF
chmod 644 /etc/vmware-prelude/profiles/custom-profile/helm/prelude_vco/90-resources.yaml

Keep serverMemoryRequest lower than serverMemoryLimit, and leave everything else in the file at its default.

  1. Check the file before you apply it. A typo here stops the services from starting:
root@vco01
cat /etc/vmware-prelude/profiles/custom-profile/helm/prelude_vco/90-resources.yaml
  1. Apply it. Redeploy the services and wait for Prelude has been deployed successfully:
root@vco01
/opt/scripts/deploy.sh
  1. Check the new limits. The Orchestrator pod should now show the new memory limit, and the Java process the new percentage:
root@vco01
kubectl -n prelude describe pods -l app=vco-app | grep -A3 -i limits
ps -eo args | grep -o -- '-XX:MaxRAMPercentage=[0-9.]*' | sort -u
Figure 2.13. The Orchestrator server's new memory limit after the redeployment.
Needs a lab check. Steps 2, 5, and 8 are based on Broadcom KB 447520 for an external Orchestrator 9.1, which lists serverJvmMaxRamPercentage with the defaults shown in step 2. The 8.x procedure used serverJvmHeapMax instead. On 9.1.1, read the defaults from the KB’s setup script, confirm a file with only the three keys in step 5 is enough (the KB writes every default into it), and check that the commands in step 8 show the change. Correct the pod label in step 8 if app=vco-app doesn’t match.
Needs a lab check. The guidance in step 3 to add as much VM memory as you add to the limit is adapted from the 8.16 procedure, which said to add RAM equal to the heap increase. Check with the 9.1 TechDocs once they cover this, and watch free -g on the appliance after step 7.

How it works

The appliance doesn’t run Orchestrator directly. deploy.sh installs it into the appliance’s Kubernetes cluster from a Helm chart, and the chart’s values decide, among other things, how much memory each container may use and how big the Java heap inside it is.

Before it installs the chart, deploy.sh looks at every folder under /etc/vmware-prelude/profiles/. For each one it runs the check script. If the script exits with 0, the profile is active, and the files in its helm/prelude_vco/ folder are layered over the chart’s default values for Orchestrator. Your 90-resources.yaml only lists the values you want to change, so everything else keeps its default.

Kubernetes then enforces the numbers. serverMemoryRequest is reserved for the container when it starts. serverMemoryLimit is a hard ceiling: if the container goes over it, Kubernetes kills it. Java sizes its heap as a share of that ceiling, serverJvmMaxRamPercentage, and uses the rest for its own threads, code, and buffers. That’s why you can’t set the percentage close to 100: the container would be killed for going over its limit before Java ever reported that the heap was full.

Needs a lab check. The description of how deploy.sh selects and applies profiles is inferred from the KB’s script and file layout. Confirm it on 9.1.1, and check whether the custom profile survives an upgrade from 9.1.0 to 9.1.1.
Back in vRO 5.5–7Edit the server's startup settings in setenv.sh, change the -Xmx value, and restart the vco-server service.
In Orchestrator 9.xWrite the new values into a custom profile under /etc/vmware-prelude/profiles/ and run deploy.sh. Kubernetes enforces the container's memory, and Java sizes its heap from it.

There's more

Clusters. Every node needs the same profile and the same VM memory. Add memory to each VM in turn, then create the profile on all three nodes. vracli cluster exec runs one command on every node, which is how Broadcom’s KB does it:

root@vco01
vracli cluster exec -- cat /etc/vmware-prelude/profiles/custom-profile/helm/prelude_vco/90-resources.yaml

Use it to check that all three nodes have the same file before you run deploy.sh once, on any node.

More heap isn’t always the answer. If the heap fills up again after you’ve doubled it, something is holding on to memory. Typical causes are a workflow that loads a whole inventory into one array, an attribute that keeps growing on every loop, or thousands of finished runs kept with large outputs. Broadcom KB 372531 explains how to find the heap dump that the server writes when it runs out of memory, under /services-logs/prelude/vco-app/file-logs/, and how to analyse it.

Needs a lab check. The heap dump folder is the one KB 372531 gives; it hasn’t been checked on a 9.1.1 appliance, standalone or embedded. The embedded lab had no heap dump to find.

Polyglot scripts have their own memory. Python, Node.js, and PowerShell actions run in separate containers, not in the Java heap. If those fail with memory errors, the values to raise are polyglotRunnerMemoryLimit and polyglotRunnerMemoryLimitVco, in the same file. Keep polyglotRunnerMemoryLimitVco 300 MB below polyglotRunnerMemoryLimit. Chapter 4 covers polyglot actions.

Needs a lab check. The 300 MB rule comes from the 8.16 procedure. The 9.1 defaults in KB 447520 (6000M and 5700M) follow it, but confirm the rule still applies on 9.1.1.

Undoing the change. Delete the custom-profile folder and run deploy.sh again to go back to the defaults. You can then shrink the VM, with it powered off.

Checked on an embedded Orchestrator 9.1.1, inside VCF Automation, 1 Dec 2026. Everything in this section, on the lab’s single-node VCF Automation appliance, auto.vmw.lab, unless a note says otherwise.

Inside VCF Automation, Orchestrator is one pod, vco-app-0, in the prelude namespace, among about 70 VCF Automation pods on the same appliance. The pod list from step 1 of this recipe looks nothing like a standalone appliance’s, so look for vco-app-0 by name.

What it runs with. The server container’s memory limit in the lab was 4.4 GB (4,399,996,928 bytes), and its Java process ran with -XX:MaxRAMPercentage=40, so a heap of about 1.8 GB: the values step 2 gives as the 9.1 defaults. Java also ran with -XX:+HeapDumpOnOutOfMemoryError and -XX:+ExitOnOutOfMemoryError: when the heap fills, it writes a heap dump and stops, so the container restarts instead of hanging. You can read all of this without root:

vmware-system-user@auto
ps -eo args | grep -- '-Dvco.app.hostname' | grep -v grep | grep -o -- '-XX:[A-Za-z]*RAMPercentage=[0-9.]*\|-XX:+[A-Za-z]*OutOfMemoryError'

The logs. The server’s log files are in /var/log/services-logs/prelude/vco-app/file-logs/, and vmware-system-user can read them without sudo:

File What’s in it
vco-server-app.log The server log. Search it for java.lang.OutOfMemoryError.
vco-server-app_scripting.log The System.log() lines of every run, each tagged SCRIPTING_LOG with the action or workflow it came from.
vco-server-app_gc.log, _gc.log.0 to .4 Java’s garbage collection: how full the heap gets and how long it pauses.
vco-server-app_access.log One file per hour of the server’s HTTP requests.
vco-server-app_catalina.log, _metrics.log The web server’s own log and the server’s metrics.

Older files are rotated with a date and hour in the name, such as vco-server-app.log.2026120108.6. The same logs also appear as /var/log/vmsp-logs/file-logs/filelogs.prelude.vco-app.vco-server-app*.log. There’s no console-logs folder, and /var/log/containers has no vco-app files.

vmware-system-user@auto
grep -c "java.lang.OutOfMemoryError" /var/log/services-logs/prelude/vco-app/file-logs/vco-server-app.log

Restarts. As vmware-system-user, kubectl fails with The connection to the server localhost:8080 was refused: no Kubernetes configuration is loaded for that login, and the one that works, /etc/kubernetes/admin.conf, is readable only by root. Switch to root and point kubectl at it, as Broadcom KB 436828 describes:

vmware-system-user@auto
sudo -i
export KUBECONFIG=/etc/kubernetes/admin.conf

Then see which of the pod’s two containers restarted, and how it last stopped:

root@auto
kubectl -n prelude get pod vco-app-0 -o jsonpath='{range .status.containerStatuses[*]}{.name}{" restarts="}{.restartCount}{" last="}{.lastState.terminated.reason}{"/"}{.lastState.terminated.exitCode}{"\n"}{end}'

In the lab:

vco-polyglot-runner restarts=0 last=/
vco-server-app restarts=4 last=Error/143

vco-server-app is the Orchestrator server; vco-polyglot-runner runs Python, Node.js and PowerShell scripts. The exit code tells you what kind of stop it was:

  • 143 (Error/143): the container was told to stop (SIGTERM) and did. Something outside the server stopped it, such as a failed health check, a restart or an upgrade. That’s what the lab showed, with no OutOfMemoryError in the log: not a heap problem.
  • 137 with the reason OOMKilled: the container went over its 4.4 GB limit and Kubernetes killed it. The lab hadn’t had one (the container’s memory events showed oom_kill 0).

To see why a container was stopped, read the pod’s recent events and the last lines the stopped container wrote. Kubernetes keeps events for a short time only, so run these soon after the restart:

root@auto
kubectl -n prelude get events --field-selector involvedObject.name=vco-app-0
kubectl -n prelude logs vco-app-0 -c vco-server-app --previous | tail -100
Needs a lab check. Not yet seen in the lab: the exit code and reason kubectl shows when the Java heap fills and ExitOnOutOfMemoryError stops the server, and where its heap dump lands on the appliance. Its heap dump path points inside the container, and the lab had no .hprof file under /var/log/services-logs/prelude/vco-app/ or /var/log/vmsp-logs/.

What you can change. Nothing in steps 2 to 8: the VCF Automation appliance has no vracli, no /opt/scripts/deploy.sh and no /etc/vmware-prelude folder, so there’s no custom profile to write and nothing to apply it with. Fix what fills the heap (see More heap isn’t always the answer above), or move heavy workflows to a standalone Orchestrator and size that one.

Needs a lab check. Not checked: whether VCF Automation’s deployment size changes the Orchestrator server’s memory limit, and whether Broadcom documents any supported way to change it on an embedded Orchestrator.

See also