"java.lang.OutOfMemoryError: Java heap space" error when uploading OVA via URL in VMware Cloud Director
search cancel

"java.lang.OutOfMemoryError: Java heap space" error when uploading OVA via URL in VMware Cloud Director

book

Article ID: 371431

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • When uploading OVA via URL, VMware Cloud Director loads the entire OVA in vCD cell's memory to parse it which leads to out of memory errors and fails to upload the OVA.
  • From the /opt/vmware/vcloud-director/logs/vcloud-container-debug.log, following entries are seen when OVA upload task fails:

2023-10-12 22:54:21,713 | ERROR    | task-service-activity-pool-4 | VAppUploadManagerImpl          | Transfer session: f0xxxxx-21xx-4xx2-a8xx-xxxxxxxx61. Unexpected error during content upload: Java heap space | requestId=2axxxx-2exx-4xx8-9cxx-dxxxxxxb,request=POST https://vcd.example.com/api/catalog/6xxxxxxx4-exxc-4fxx-9xx5-9fxxxxxxx/action/upload,requestTime=1697151193454,remoteAddress=ip_address:64017,userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ...,accept=application/*+xml;version 39.0.0-alpha vcd=3xxxxxxb-a5xx-4xx2-xxe5-bxxxxxxxxxx4,task=1xxxxxxf-cxx0-43xx-xx78-1xxxxxxxxxxxx7 activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:1xxxxxxf-xxa0-43xx-8xx8-xxxxxxxx17)

java.lang.OutOfMemoryError: Java heap space

        at java.base/java.util.Arrays.copyOf(Arrays.java:3745)

        at java.base/java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:172)

        at java.base/java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:686)

 

Environment

VMware Cloud Director for Service Provider 10.x

Cause

VMware Cloud Director supports uploading only OVFs via the URL.

Resolution

OVAs must be uploaded from the computer, such as a local hard drive, a network share or a CD/DVD drive.

 

Additional Information