Help me with PermGen:OutOfMemoryException

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.

This entry was posted in eclipse, java, plugins. Bookmark the permalink.

0 Responses to Help me with PermGen:OutOfMemoryException

  1. Wayne BEaton says:

    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 says:

    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 says:

    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 says:

    Use JProfiler

  6. Maarten says:

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

    Is that the same thing?

  7. 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 😉

  8. 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.

  9. Donk says:

    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

Leave a Reply

Your email address will not be published. Required fields are marked *