Error: OutOfMemoryError: Java heap space

Article ID: 57519

Article Type: Troubleshooting

Last Modified:

The JVM (Java Virtual Machine) ran out of memory during a Salesforce backup or restore operation.

Symptoms

During a Salesforce backup or restore operation that contains a large number of records, files, or metadata, the operation is suspended and the SFEngine.log contains the following error: Error:  OutOfMemoryError: Java heap space Source: xxxxxxxxxx, Process: SF

Causes

Approximately 2 GB of heap memory is needed to download 1 million files. If you download more than 1 millions files and do not increase the heap memory, you will run out of heap memory.

Resolution

  1. On the Salesforce site, go to Setup and look up the following information:
    • The total file count: Setup > Storage Usage > Current File Storage Usage
    • The maximum number of API calls: Company Information > API Requests, Last 24 Hours > (n max)
  2. Based on your file count, calculate the amount of heap memory that is needed in your environment:
    • File count is more than 1 million, but less than the maximum number of API calls allowed by Salesforce. (For example, the file count is 2.5 million and the max API calls is 9 million.)
      1. Divide the file count by 1 million, and then multiply by 2. For example, 2.5 x 2 GB = 5 GB
    • File count is more than the maximum number of API calls allowed by Salesforce. (For example, the file count is 18 million and the max API calls is 9 million.)
      1. Determine the percentage of API calls that the Commvault software can use per day. The default value for Commvault backup operations is 50% of the total APIs calls for an organization.
      2. If the percentage is higher or lower than the default value of 50%, update the File download limit per backup option.
      3. Multiply the maximum number of API calls by the percentage in the File download limit per backup option. For example, if your organization has a maximum of 9 million API calls and the file download limit is 50%, then 4.5 million API calls can be used for backups.
      4. Divide the maximum number of API calls by 1 million, and then multiply by 2. For example, 4.5 x 2 GB = 9 GB
  3. Convert the value to megabytes, and then use the rounded value for the following additional setting.
  4. To the client computer add the sCV_JVM_MAX_HEAP additional setting as shown in the following table. For instructions about adding an additional setting from the CommCell Console, go to Adding Additional Settings from the CommCell Console on the http://documentation.commvault.com site.
Property Value
Name sCV_JVM_MAX_HEAP
Category CloudConnector
Type String
Value The maximum heap memory size in megabytes (MB) that the JVM (Java Virtual Machine) can use. 
To allow a maximum heap space of 4 GB, set the value of the additional setting to 4096M
Important: Verify that you have enough RAM available.

5. Resume the backup or restore job.

1 Commvault Way, Tinton Falls, NJ 07724 Sitemap | Legal Notices | Trademarks | Privacy Policy
Copyright © 2022 Commvault | All Rights Reserved.