Why does the Force.com IDE time out or display a Java heap size error when I'm building a new project?
|Knowledge Article Number||000163412|
|Description||You are a Salesforce developer working in a production, sandbox or dev org. When you try to create a Force.com project in Eclipse using the Force.com plugin, even after selecting a small amount of metadata to retrieve, the IDE hangs on polling the server (*-api.salesforce.com/.) You eventually receive the message:
"Warning occurred while fetching Force.com components::
Server processing time has exceeded limit (600 secs)
Abort operation or Continue waiting for server?"
Selecting 'Continue' and waiting further eventually throws a Java heap size limit error, and the project build fails.
Making a smaller selection of components does not have any effect. You don't have this issue when creating a project for another client.
|Resolution||The org that you are working on may have several, large managed packages installed. To check if these exist, look under Setup -> App Setup -> Installed Packages. Any packages that display an icon with a blue arrow pointing down is a managed package.
It is standard behaviour for the IDE to extract read-only copies of managed packages (as stated in our documentation here). (Partners and AppExchange developers take note: your managed package's code is marked as 'Hidden' in these read-only copies).
The extract can be completed if you increase the memory allowance for Eclipse and continue to wait for a the build to complete. To expand Eclipse's memory allowance:
- Open the eclipse.ini file in the main Eclipse folder
- Increase the -Xmx property to 1200m (this is 1.2 Gigs of RAM).
- Note: additional memory allowance up to 2 GB and beyond may require the 64-bit edition of Eclipse and JVM
If you receive the time-out message, click Continue and eventually the build will complete. Some users have witnessed wait times of up to 80 minutes.