Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space [message #668570] Fri, 06 May 2011 09:26 Go to next message
n.lincke is currently offline n.linckeFriend
Messages: 11
Registered: April 2011
Junior Member
Hello Everyone,

I have a small problem. I keep getting exceptions like "java.lang.OutOfMemoryError: PermGen space" or "MESSAGE Unhandled event loop exception" when I start an eclipse version with my XText-Plugin. Those errors appear when I try to create a normal java class or a second project in the eclipse instance with my plug-in of course .

That's really annoying and I hope someone can help me with this newby problem.
I already tried to play with the eclipse ini and even an upgread of my vm to the newest version hasn't so far helped
Thanks...

I am running eclipse-SDK-3.7M6-Xtext-2-nightly-HEAD-win32 on an 64 bit Windows 7 computer... The Java version is 1.6.0_25-b06
Re: java.lang.OutOfMemoryError: PermGen space [message #668574 is a reply to message #668570] Fri, 06 May 2011 09:44 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7098
Registered: July 2009
Senior Member
See
http://wiki.eclipse.org/FAQ_How_do_I_increase_the_permgen_si ze_available_to_Eclipse%3F

On 06/05/2011 10:26, n.lincke@lincke-online.de wrote:
> Hello Everyone,
>
> I have a small problem. I keep getting exceptions like
> "java.lang.OutOfMemoryError: PermGen space" or "MESSAGE Unhandled
> event loop exception" when I start an eclipse version with my
> XText-Plugin. Those errors appear when I try to create a normal java
> class or a second project in the eclipse instance with my plug-in of
> course .
> That's really annoying and I hope someone can help me with this newby
> problem.
> I already tried to play with the eclipse ini and even an upgread of my
> vm to the newest version hasn't so far helped
> Thanks...
>
> I am running eclipse-SDK-3.7M6-Xtext-2-nightly-HEAD-win32 on an 64 bit
> Windows 7 computer... The Java version is 1.6.0_25-b06
Re: java.lang.OutOfMemoryError: PermGen space [message #668613 is a reply to message #668574] Fri, 06 May 2011 12:34 Go to previous messageGo to next message
n.lincke is currently offline n.linckeFriend
Messages: 11
Registered: April 2011
Junior Member
Thanks for your replay.

I know this FAQ and I already played with the PremSize parameters....
But I still getting this problem... I even tried to ensure that my Plug-in(the new eclipse instance with the plug-in) uses this parameters...
I haven't tried so far to change to IBM JVM... But I would prefer to avoid this....
Re: java.lang.OutOfMemoryError: PermGen space [message #668619 is a reply to message #668613] Fri, 06 May 2011 12:44 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3109
Registered: July 2009
Senior Member
How do your launch configuration parameters look like?

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 06.05.11 14:34, schrieb n.lincke@lincke-online.de:
> Thanks for your replay.
> I know this FAQ and I already played with the PremSize parameters....
> But I still getting this problem... I even tried to ensure that my
> Plug-in(the new eclipse instance with the plug-in) uses this parameters...
> I haven't tried so far to change to IBM JVM... But I would prefer to
> avoid this....
>
Re: java.lang.OutOfMemoryError: PermGen space [message #669413 is a reply to message #668570] Tue, 10 May 2011 09:12 Go to previous messageGo to next message
n.lincke is currently offline n.linckeFriend
Messages: 11
Registered: April 2011
Junior Member
-Xms40m -Xmx512m -XX:PermSize=512M

I even tried higher Sizes... but it didn't solved my problem...
Re: java.lang.OutOfMemoryError: PermGen space [message #669597 is a reply to message #669413] Tue, 10 May 2011 21:31 Go to previous messageGo to next message
LD  is currently offline LD Friend
Messages: 28
Registered: March 2011
Junior Member
I have the same problem that makes eclipse crash. I am using modeling helios SR2 with xtext 1.0.2, and it crash on startup if I have projects. If I don't have projects and I try to update eclipse it crashes.

- An internal error occurred during: "Workbench early startup".
java.lang.OutOfMemoryError: PermGen space

- !MESSAGE An internal error occurred during: "Contacting Software Sites".
java.lang.OutOfMemoryError: PermGen space

I am using windows 7, 64bits and jdk 1.6.0_25_b06 of 32bits and eclipse of 32 bits too.
In 64 bits all, I have more problems.

I tried configuring the eclipse .ini file but I haven't found the correct parameters for memory configuration.

I really need help with this issue.

Thanks in advance.
Re: java.lang.OutOfMemoryError: PermGen space [message #669674 is a reply to message #668570] Wed, 11 May 2011 06:51 Go to previous messageGo to next message
n.lincke is currently offline n.linckeFriend
Messages: 11
Registered: April 2011
Junior Member
Could this be a Windows 7 64Bit related problem?
Re: java.lang.OutOfMemoryError: PermGen space [message #669679 is a reply to message #669674] Wed, 11 May 2011 07:11 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7098
Registered: July 2009
Senior Member
On 11/05/2011 07:51, forums-noreply@eclipse.org wrote:
> Could this be a Windows 7 64Bit related problem?
No it's a Sun JVM 'feature'; class descriptions, which EMF creates many
of, have only limited storage capacity.

Regards

Ed Willink
Re: java.lang.OutOfMemoryError: PermGen space [message #669769 is a reply to message #669413] Wed, 11 May 2011 13:06 Go to previous messageGo to next message
Andrea Santi is currently offline Andrea SantiFriend
Messages: 12
Registered: April 2011
Junior Member
N.lincke.lincke-online.de wrote on Tue, 10 May 2011 05:12
-Xms40m -Xmx512m -XX:PermSize=512M

I even tried higher Sizes... but it didn't solved my problem...


Exactly the same here.

Quoting from the eclipse wiki (How_do_I_increase_the_permgen_si ze_available_to_Eclipse page)



Quote:
Note: Eclipse 3.6 and below on Windows has a bug with Oracle/Sun JDK 1.6.0_21 (July 2010) where the launcher cannot detect a Oracle/Sun VM, and therefore does not use the correct PermGen size. If you are using either of this version, add the -XX flag to the eclipse.ini as described above.


I have Windows 7 with SUN JVM and JDK 1.6.0_17 so there should be no problems. Even with 800mb of PermSize I have this problem.

Any idea about the reason?

[Updated on: Wed, 11 May 2011 13:09]

Report message to a moderator

Re: java.lang.OutOfMemoryError: PermGen space [message #669787 is a reply to message #669769] Wed, 11 May 2011 13:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31836
Registered: July 2009
Senior Member
Andrea,

There's only one solution, increasing the perm gen space. Of course
it's important to do it for the process that's having the problem, so if
the problem is in a process that's being launched separate from the IDE
then you need to ensure it's launched with the necessary options.


Andrea Santi wrote:
> N.lincke.lincke-online.de wrote on Tue, 10 May 2011
> 05:12
>> -Xms40m -Xmx512m -XX:PermSize=512M
>>
>> I even tried higher Sizes... but it didn't solved my
>> problem...
>
>
> Exactly the same here.
>
> Quoting from
>
> Quote:
>> Note: Eclipse 3.6 and below on Windows has a bug with
>> Oracle/Sun JDK 1.6.0_21 (July 2010) where the launcher
>> cannot detect a Oracle/Sun VM, and therefore does not use
>> the correct PermGen size. If you are using either of this
>> version, add the -XX flag to the eclipse.ini as described
>> above.
>
>
> I have Windows 7 with SUN JVM and JDK 1.6.0_17 so there
> should be no problems. Even with 800mb of PermSize I have
> this problem.
>
> Any idea?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: java.lang.OutOfMemoryError: PermGen space [message #669848 is a reply to message #669769] Wed, 11 May 2011 19:13 Go to previous messageGo to next message
Knut Wannheden is currently offline Knut WannhedenFriend
Messages: 298
Registered: July 2009
Senior Member
I suggest you try with the following options (512M is unnecessarily much PermSize while it is a rather low limit for the heap):

-Xmx1g -XX:MaxPermSize=256m

Cheers,

--knut
Re: java.lang.OutOfMemoryError: PermGen space [message #670058 is a reply to message #669848] Thu, 12 May 2011 14:14 Go to previous messageGo to next message
n.lincke is currently offline n.linckeFriend
Messages: 11
Registered: April 2011
Junior Member
I have already tried this without any luck... I have tried high mem options on both instances of eclipse - the main one and the new instance with the plug-in
Re: java.lang.OutOfMemoryError: PermGen space [message #670074 is a reply to message #670058] Thu, 12 May 2011 14:54 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
It is MaxPermSize, not just PermSize afaik.
I have: -XX:MaxPermSize=256m -Xms40m -Xmx2000m

- henrik

On 5/12/11 4:14 PM, forums-noreply@eclipse.org wrote:
> I have already tried this without any luck... I have tried
> high mem options on both instances of eclipse - the main
> one and the new instance with the plug-in
Re: java.lang.OutOfMemoryError: PermGen space [message #670113 is a reply to message #670074] Thu, 12 May 2011 17:00 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7098
Registered: July 2009
Senior Member
Hi

It can be both.

My favourite setting is

-Xmx1g -XX:PermSize=64M -XX:MaxPermSize=128M

I'm beginning to think about increasing slightly. In the last couple of
week I've received memory limits when installing new software.

Regards

Ed Willink


On 12/05/2011 15:54, Henrik Lindberg wrote:
> It is MaxPermSize, not just PermSize afaik.
> I have: -XX:MaxPermSize=256m -Xms40m -Xmx2000m
>
> - henrik
>
> On 5/12/11 4:14 PM, forums-noreply@eclipse.org wrote:
>> I have already tried this without any luck... I have tried
>> high mem options on both instances of eclipse - the main
>> one and the new instance with the plug-in
>
Re: java.lang.OutOfMemoryError: PermGen space [message #674189 is a reply to message #670113] Thu, 26 May 2011 04:40 Go to previous messageGo to next message
LD  is currently offline LD Friend
Messages: 28
Registered: March 2011
Junior Member
Hi, well for a reason I still don't know. The parameters given to the eclipse.ini are not taken. So I'm using java commands directly to execute the eclipse with the specific parameters.

Here is a solution that at least interrupt the constant crashing of eclipse.
Command format: java [ options ] -jar file.jar [ argument ... ]

Examples:
java -XX:PermSize=64M -XX:MaxPermSize=256M -Xms512M -Xmx1024M -jar <ECLIPSE_HOME>/plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar (for eclipse 3.5.x)
java -XX:PermSize=64M -XX:MaxPermSize=256M -Xms512M -Xmx1024M -jar <ECLIPSE_HOME>/plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar (for eclipse 3.6.x)

Best Regards,

[Updated on: Thu, 26 May 2011 04:44]

Report message to a moderator

Re: java.lang.OutOfMemoryError: PermGen space [message #686668 is a reply to message #674189] Wed, 22 June 2011 17:24 Go to previous messageGo to next message
Andrea Santi is currently offline Andrea SantiFriend
Messages: 12
Registered: April 2011
Junior Member
Edit:

Sorry, it was my fault.

Finally everithing is going well. I had also to change the memory settings related to the eclipse configuration launched from the original eclipse Razz.

Xtext 2.0 is working really fluidly (looking at the domain model example). Well done guys!!!

[Updated on: Wed, 22 June 2011 17:51]

Report message to a moderator

Re: java.lang.OutOfMemoryError: PermGen space [message #691085 is a reply to message #686668] Thu, 30 June 2011 16:56 Go to previous messageGo to next message
john doe is currently offline john doeFriend
Messages: 74
Registered: June 2011
Member
Do you mind telling us how you fixed it?!
I'm having the EXACT same problem. Every time I run my plugin, I get the following error:

java.lang.OutOfMemoryError: PermGen space


I am using windows 7 (32 bit) with jdk1.6.0_26 and Eclipse helios 3.6.1

My eclipse.ini file looks like

-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx1024m
-XX:MaxPermSize=512m


Can someone help me out?
I've been stuck on this all day...
Thanks
Re: java.lang.OutOfMemoryError: PermGen space [message #691099 is a reply to message #691085] Thu, 30 June 2011 17:39 Go to previous messageGo to next message
john doe is currently offline john doeFriend
Messages: 74
Registered: June 2011
Member
I'm running helios 3.6.1 and was using the latest version of java (in my case jdk1.6.0_26) to try and fix this problem but it didn't work. I had to uninstall java jdk and download jdk1.6.0_20 from here. Then I opened up my eclipse.ini file and added in -XX:MaxPermSize=256m
My eclipse.ini thus looks like:

-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vmargs
-Xms40m
-Xmx1024m
-XX:MaxPermSize=256m


Eclipse no longer crashes when I run my plugin and I no longer get the 'OutOfMemoryError'. Hope this helps.

[Updated on: Thu, 30 June 2011 17:41]

Report message to a moderator

Re: java.lang.OutOfMemoryError: PermGen space [message #691305 is a reply to message #691085] Fri, 01 July 2011 07:46 Go to previous messageGo to next message
Andrea Santi is currently offline Andrea SantiFriend
Messages: 12
Registered: April 2011
Junior Member
john doe wrote on Thu, 30 June 2011 12:56
Do you mind telling us how you fixed it?!
I'm having the EXACT same problem. Every time I run my plugin, I get the following error:

java.lang.OutOfMemoryError: PermGen space


I am using windows 7 (32 bit) with jdk1.6.0_26 and Eclipse helios 3.6.1

My eclipse.ini file looks like

-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx1024m
-XX:MaxPermSize=512m


Can someone help me out?
I've been stuck on this all day...
Thanks



Hi, I'm using Helios with jdk1.6.0_17 on a machine with 3GB of RAM.

This is my eclipse.ini

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx1024m


Moreover for avoiding problems, as other said, you have also to increse the amount of memory dedicated to the eclipse configuration that you are using for launching the IDE of your language. These are the arguments that i pass to the Eclipse configuration.

-Dosgi.requiredJavaVersion=1.5  -Xms40m -Xmx1024m -XX:MaxPermSize=512m


I hope it helps.
Re: java.lang.OutOfMemoryError: PermGen space [message #691401 is a reply to message #691305] Fri, 01 July 2011 11:44 Go to previous messageGo to next message
john doe is currently offline john doeFriend
Messages: 74
Registered: June 2011
Member
Thanks for that. The solution for me was to downgrade my sdk version to jdk1.6.0_20.
It would not work for me with the latest sdk release.
Regards
Re: java.lang.OutOfMemoryError: PermGen space [message #692326 is a reply to message #691401] Mon, 04 July 2011 08:09 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
As Ed said, memory settings in the eclipse.ini only apply for the first
Eclipse itself, not for any Java processes (e.g. Run as->Eclipse
Application) spawned from that. These have individual settings in their
launch configurations (Run Configurations... -> VM Args on some tab).

It must be -XX:MaxPermSize=??? not just -XX:PermSize=???. In my case
128m seem to be enough but 256m may be safer. Note that the "m" is
important as 128 byte is not too much :-)

Don't now about any Windows 7 issues as I am on a Mac.

Am 01.07.11 13:44, schrieb john doe:
> Thanks for that. The solution for me was to downgrade my sdk version to
> jdk1.6.0_20.
> It would not work for me with the latest sdk release.
> Regards


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
Re: java.lang.OutOfMemoryError: PermGen space [message #716284 is a reply to message #668570] Tue, 16 August 2011 21:55 Go to previous message
sos.freelancer is currently offline sos.freelancerFriend
Messages: 1
Registered: August 2011
Junior Member
Hello,

I had the same issue with eclipse helios and indigo.
The solution is that you have to name your eclipse.ini exactly like your eclipse.exe

example "indigo32_jboss_tools.exe" should have a "indigo32_jboss_tools.ini", otherwise the configuration in the ini file will not be used.

enjoy.

[Updated on: Tue, 16 August 2011 21:57]

Report message to a moderator

Previous Topic:XBase operators marked as error in DomainModel example project
Next Topic:Finding reason for IParser.NullImpl usage
Goto Forum:
  


Current Time: Sat Apr 17 23:11:37 GMT 2021

Powered by FUDForum. Page generated in 0.03013 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top