java.lang.OutOfMemoryError: PermGen space

jayavardhan picture jayavardhan · Jan 28, 2011 · Viewed 56.7k times · Source

i'm getting the following error "http-9000-5" java.lang.OutOfMemoryError: PermGen space

org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.OutOfMemoryError: PermGen space.

My application using axis2.I increased the heap size 1024mb.But its not working.What would be the problem.Solution please

Answer

Harry Joy picture Harry Joy · Jan 28, 2011

PermGen and heap size are different from each other.

You need to increase permgen space like this:

-XX:PermSize=256m 
-XX:MaxPermSize=256m

add this flags.

Also look at this: explaining-java-lang-outofmemoryerror-permgen-space and this: how-to-deal-with-java-lang-outofmemoryerror-permgen-space-error

Hope this helps.