java.lang.OutOfMemoryError: Java heap space events for the operationsmanager service.YYYY-MM-DDThh:mm:ss ERROR [vcf_om,#####] [o.s.a.i.SimpleAsyncUncaughtExceptionHandler,om-exec-28] Unexpected exception occurred invoking async method: public void com.vmware.vcf.telemetry.vac.service.impl.VcfMetricsCollectorServiceImpl.triggerMetricsCollection(java.util.List)
java.lang.OutOfMemoryError: Java heap space
ERROR [vcf_om,#####] [c.v.v.p.v.u.CredentialsValidationTaskExecutor,om-exec-2] Error occurred in validation tasks: java.lang.OutOfMemoryError: Java heap space
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)A fix has been implemented in SDDC Manager 9.1 to alleviate this issue by greatly reducing the Operations Manager service memory consumption. However, in very large environments with high task volumes, complex inventory data, or frequent concurrent operations, the issue may persist.
For version prior to 5.2.1, use the following workaround to increase the heap size:
Take a snapshot of the SDDC Manager VM.
SSH to the SDDC Manager appliance using the vcf user and elevate to root using su.
Stop the operationsmanager service by running the following command:
systemctl stop operationsmanager
Edit the service configuration file located at /etc/vmware/vcf/operationsmanager/vcf-operations-manager.conf. Use a text editor like vi:
vi /etc/vmware/vcf/operationsmanager/vcf-operations-manager.conf
Locate the line containing the maximum heap size setting (it will include -Xmx2G) and change it to -Xmx4G
Original: -Xmx2G
New: -Xmx4G
Save the file and exit the text editor (if using vi, press Esc, type :wq!, and press Enter).
Start the operationsmanager service:
systemctl start operationsmanager
The operationsmanager service will now run with a maximum Java Heap Memory of 4GB, resolving the OutOfMemoryError and restoring service stability.
If you encounter java.lang.OutOfMemoryError: Java heap space in the Domain Manager service, refer to: SDDC Manager Unresponsive: vcf-domain-manager Crashes with Java Heap Space OutOfMemoryError