function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sugansugan 

Facing error ("Failed to create batch", "Java Heap Space") while loading a large number of attachments (over 30,000)

I am trying to load a large number of attachments 10,000+ and am facing errors like "Java Heap space" and "Failed to create batch", I have performed the following actions already
1) Increased Java heap space, 2) Reduce Batch size to 1.
Please let me know if you have any alternative/effecient way to get this done 
Daniel BallingerDaniel Ballinger

I assume you are using the Bulk API. 

Do you need to load all the attachments in a single batch?

Do you have the stacktrace from when the exception occured? It might show if it is happening in your local code or with the Salesforce integration.

sugansugan

Hi Daniel,

I actually used the salesforce data loader in bulk api mode and wanted to know what better options I had, would you advise that I write a client application to make use of SOAP (or) Bulk API? 

Regards,
Sugan.