tags:

views:

193

answers:

1

Hi!
I am working with tomcat 6.0, and while I am indexing (not while i am starting tomcat), I have a permgen space error.
How could I increase that space??

Thanks

+1  A: 

You can use :

-XX:MaxPermSize=128m

to increase the space. But this ususally only postpones the inevitable.

You can also enable the PermGen to be garbage collected

-XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled

Usually this occurs when doing lots of redeploys. I am surprised you have it using something like indexing. Use virtualvm or jconsole to monitor the Perm gen space and check it levels off after warming up the indexing.

Maybe you should consider changing to another JVM like the IBM JVM. It does not have a Permanenet Generation and is immune to this issue.

Peter Tillemans
Thanks!! But where must I write it down??I guess in one flile here: tomcat/conf Am I wrong??
Blanca
For tomcat you can create an environment variable CATALINA_OPTS with as value these options concatenated. The startup script will add these to the Java commandline before starting tomcat. This cannot be done from tomcat configuration as the JVM is already configured at that point.
Peter Tillemans