Sciology = Science + Technology

Commonsense in Technology

Help me with PermGen:OutOfMemoryException

Posted by sureshkrishna on September 28, 2007

I have a plugin developed for and AJAX based application with the help of Platform + EMF + WTP combination.
Many of the clients who report this out of memory have following conditions…
# Eclipse or Windows OS is not shut down for a long time; nearly for days.
# After a long time of inactivity on eclipse, Whenever a client clicks on any of the action or an editor, application just hangs.
# When a client is working on this application for a long time CPU goes 100% and except killing the eclipse application there is not other way.
Of course at this point of time i have no idea, what makes application crash with PermGen Error. There could be some thing wrong with the plugins that we made, but at the same time i dont get any error log for this PermGen:OutOfMemoryException.

I would appreciate if anyone can let me know about some of the utilities that i can use to find out the root cause.

Anykind of suggestions and solutions will be appreciated.

About these ads

13 Responses to “Help me with PermGen:OutOfMemoryException”

  1. Take a look here:

    http://dev.eclipse.org/blogs/wayne

    The short answer is add: -XX:MaxPermSize=128M into your eclipse.ini file. Or, you can try a different JVM.

    HTH,

    Wayne

  2. Amine said

    The root cause is probably a memory leak…and the following link should help :

    http://www.ibm.com/developerworks/java/library/j-leaks/

    Good luck !

  3. >The root cause is probably a memory leak…
    No, not for a PermGenSpace exception. This is the amount of space dedicated to load the classes. The memory leaks are shown by the OutOfMemoryExceptions, and occur when too many instances of objects stay in memory.

    Hope this helps.

  4. Nicolas Bihan said

    As it is said before this leak of permGenSpace can be adressed with -XX:MaxPermSize=128M where 128 is the amount of memory allocated for class loading.
    This issue is due to a limitation of the Sun JDK. I think someone already open a bug report to Sun.
    If you try an IBM jdk you should’nt have this issue just because the default amount of memory allocated is bigger !

    That’s sound strange but that’s for real :)

  5. john cage said

    Use JProfiler

  6. Maarten said

    My eclipse.ini (Mac OSX Intel, Eclipse 3.3) says:
    –launcher.XXMaxPermSize
    128M

    Is that the same thing?

  7. Nick Boldt said

    As others have said.

  8. Some how the “–launcher.XXMaxPermSize” does not work for me.
    I am not able to get any significant result.

    Next i should try to do profiling and see if there are really memory leaks ;)

  9. PermGen gets filled by class and method names, and the result of String.intern(). This blog has a very nice explanation and practical use-case of an issue detected and fixed.

  10. Donk said

    Suresh,

    remove -launcher.XXMaxPermSize, it has a Bug in eclipse 3.3 when starting a sun vm maxpermsize isn’t set.
    use properties as desribed above

    donk

  11. Nageswararao said

    –launcher.XXMaxPermSize
    256M

    I have set above entry but still problem is irritating

  12. Nag said

    can any body help me how to profile GMF plugins(we developed). Iam new to this plug in development using GMF(Eclipse).

  13. Irene said

    Thanks for your post. One other thing is when you are advertising your property by yourself,
    one of the difficulties you need to be aware of upfront is just
    how to deal with household inspection accounts. As a FSBO seller,
    the key to successfully shifting your property plus saving money in real
    estate agent commission rates is know-how. The more
    you know, the more stable your sales effort will likely be.
    One area exactly where this is particularly important is home inspections.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 37 other followers

%d bloggers like this: