Search
Twitter
« SOQL Using Scope (new in Winter 15') | Main | Using An Apex Map with a List of sObjects »
Monday
Jul142014

Salesforce Dataloader Heap Space Exception

If you are trying to upload and download large volumes of information using the Salesforce Dataloader you might run into this error.

 "Java Heap Space" from the Data Loader UI version 21.0 onwards

This is common especially if what you are loading is large attachments (PDFs, Powerpoints etc). The Salesforce Dataloader is a Java application that runs on the local Java Virtual Machine (JVM). The heap size is essentially how much memory is allocated to the application while it runs. Starting with version 21 of the Salesforce Dataloader the heap size is more restrictive than in past versions. 

Part of the problem is the you can't really come up with a default heap size that is perfect for every use case so by default they ship with the 80/20 rule. What is best for 80% of the use cases. Now, if you are in the 20% - you are special and that is why you are reading this.  

 

  1. Increase the default memory for Salesforce Data Loader (this is what I did). This is actually pretty easy. Essentially you are going to create a new desktop shortcut to the Dataloader or just edit the current one to pass in some different memory parameters. 

 

Right click your Salesforce DataLoader Icon

right click and edit data loader shortcut

Click to enlarge - modify Dataloader parametersTo make it easy, you can click on the above screenshot to enlarge it. You can then copy and paste the text from the line below. 

"C:\Program Files (x86)\salesforce.com\Data Loader\Java\bin\javaw.exe" -Xms1024m -Xmx1256m -Dappdata.dir="C:\Users\<USER>\AppData\Roaming" -jar "C:\Program Files (x86)\salesforce.com\Data Loader\dataloader-27.0.1-uber.jar"

In the above line you will need to replace "<USER>" with your username. You'll notice in the screenshot that mine is "SalesforceGeneral.Office". 

2. Option number 2 would be to skip all this shortbut business and revert to an older version of the data loader. You can download Version 20, here.

 


PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (1)

Salesforce General,

Thanks for the article on modal visualforce pages--I'd been looking for how to do that for a bit!

One question, how could you get that popup window to display no matter what page you're on without having to necessarily be on that custom visualforce page you included that had the button that says "Show the Popup"? Like if I had a button on a Lead, or an Account, how could I get that popup window to just display above all Salesforce information no matter what page I'm on?

Thanks! And thanks again for the article! I couldn't find another place to comment or ask this question, so I'm asking it here! Thanks!

Brad
March 24, 2015 | Unregistered CommenterBrad

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.