quality@glassfish.java.net

Re: Is anyone else hitting 'OutOfMemoryError: PermGen space' on a regular basis with GlassFish 3.0 ?

From: Paul Merlin <eskatos_at_n0pe.org>
Date: Wed, 11 May 2011 14:06:57 +0200

Quoting Richard Kolb <rjdkolb_at_gmail.com>:
> > Indeed, I agree that having it documented clearly in all JEE books and
> > related products manuals would be nice.
>
> How about NetBeans and Eclipse warning you before it happens and asking for
> a restart ?

Seems hard to achieve as it depends heavily on references graph at runtime.


> > BTW I believe that OSGi can suffer from the very same issue.
>
> Ouch. Did not know that.

From my point of view, the garbage collection paradigm mandates that developpers
take care of their references. I've seen little cases of that issue created
directly and only by a developer code but often by used libraries and their
usage where objects keep "static back references" to objects of classes from the
application server classloader. So it can virtually happen in any managed code
context if you don't take care of it. Using external libraries makes things
harder.

Yet again that's what I understood while experimenting and reading, sometimes
the solution hides in details. If someone with big knowledge in this area could
write an article/howto/faq/post about this subject I'm sure he'll get big
momentum from the Java community.

Best regards

/Paul