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
TehNrdTehNrd 

Eclipse Deployment: OutOfMemoryError: Java heap space

When trying to deploy apex code we are receiving the following error.

Unable to test deploy Force.com components.

Reason:
OutOfMemoryError: Java heap space


I have no idea what this means or how to fix it. Ideas?


Message Edited by TehNrd on 10-14-2008 10:25 AM
David VPDavid VP
Try to give eclipse some more JVM memory.
In eclipse.ini :

-vmargs
-Xms128m
-Xmx512m
-XX:MaxPermSize=128m

Google for these settings, you'll find lots of references of eclipse users running out of memory.


David
TehNrdTehNrd
We tried those settings you supplied but still received the error. I guess we can up the values and try again.
David VPDavid VP
Yes, I haven't seen this happen with the Force.com IDE yet (you must have a *lot* of code :smileyhappy: ) but in other (Java) projects this same sort of exception pops up all too often.
Let me know if you can get it to work with this.

-David
TehNrdTehNrd
So I upped the values to:

-showsplash
-vmargs
org.eclipse.platform
--launcher.XXMaxPermSize
512m
-Xms512m
-Xmx1024m

and we have been validating a deployment for nearly 40 minutes and Task Manager is showing mem usage of 485,000 K for Eclipse. I think this is related to the same issue I am having here: http://community.salesforce.com/sforce/board/message?board.id=apex&message.id=8138

Are there any other ways to deploy code besides using ANT and the Eclipse toolkit? Eclipse is easy but not working. ANT seems a little more complicated and we have never used it. This is becoming a serious issue as we need to deploy some fixes that have appeared with the Winter 09 release.
TehNrdTehNrd
And we just got the out of memory error once again. Memory usage peaked at just over 1GB. I am now almost convinced these two problems are related and this is a major problem as we can not deploy or update code.

I am looking into ANT but I am stuck on setting up the environment variables (such as ANT_HOME, JAVA_HOME, and PATH). Where are these located and how do I do this?


Message Edited by TehNrd on 10-14-2008 05:02 PM
KaydanceKaydance
For Windows:
right click My Computer --> Properties
Click the Advanced Tab then the Environment Variables button
Always ThinkinAlways Thinkin
I was getting the same error when I try to create a new Project along with the alert "Unable to create project." Happened after I upgraded to Force.com IDE 14.0.1.200810311433.

I was attempting to create a Project with all my metadata components selected. I upped my eclipse.ini params to

XXMaxPermSize
512m
-vmargs
-Xms40m
-Xmx512m
 
...but that didn't help. So I then deselected Reports and ReportTypes from the metadata components and that did the trick.

TehNerd, hope you found a way to get your APEX deployed! Write us back if you did!
TehNrdTehNrd
I was able to get it deployed using the ANT tool.

We still get this memory error with the new version. I have been working with salesforce to resolve but I have just been super busy with it being the holidays and year end.
Always ThinkinAlways Thinkin

Ran into this problem again (new org, new computer, new IDE version) with an added twist: Windows 7 won't let me edit the eclipise.ini file! Rather than wasting time battling with Windows (since I'm getting a new laptop in 2 weeks anyway), I didn't bother trying to resolve the OS interference.

 

I was trying to initiate a deployment from an existing Force.com project to production so I could delete a couple of obsolete classes. I got the OutOfMemoryError: Java heap space error when trying to pull up the Deployment Plan so I could select Delete. I simply created a new Force.com project, only selected Apex Classes and was able to push through the deployment (or, more accurately the undeployment) without the error.

Neel DesaiNeel Desai

I solved problem by changin following in eclipse.ini file

 

--launcher.XXMaxPermSize
256m

 

to

 

--launcher.XXMaxPermSize
1024m

 

launcher.XXMaxPermSize is new in Eclipse 3.5 onwards.

SForceBeWithYouSForceBeWithYou

Luke,

 

You may want to house the eclipse/ folder under your home directory instead of in Program Files in order to be able to edit it.  Running cmd.exe as administrator and notepadding it might work, but you may not have admin access?

 

To all above, I'm running Windows 7 Enterprise, JRE 7, and Eclipse Indigo.  I was able to get things going with the following modifications to eclipse.ini:

 

openFile
-vmargs
-Xmas40m
-Xmx1024m

 Don't modify the XXMaxPermSize beyond 256m, it's a reported bug I believe:

http://www.eclipse.org/forums/index.php/t/171902/

 

My Eclipse started lagging, and I thought it was related to the Force.com IDE, but it was apparently not.

 

Nathan

youtube.com/MayTheSForceBWithYou

@SForceBeWithYou

venkateswarluvenkateswarlu

Hi I m facing same problem while deploying Force.com IDE 

Can  u pls reply to me where i need to chage.

Keyur Pendal 3Keyur Pendal 3
Here you can the detailed instruction: https://help.salesforce.com/articleView?id=000163412&type=1