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, 7 Apr 2010 15:07:17 +0200

Le Mercredi 07 Avril 2010 15:31:04, Richard Kolb a écrit :
> Perhaps the examples are not polluted by tons of open
> source monolith JARS like my apps are.

Yes this definetely makes difference.

Just to paraphrase both of us and clarify things a bit more, if the deployed app
only use classes that are present in the container classpath (eg. javax.* & co)
they are loaded only once in a classloader reused by every redeployment. In this
case, no permgen space is wasted at all.

On the contrary if your app embedd jars with a lot of classes you can face the
OOME much more quickly.

/Paul