tags:

views:

122

answers:

2

Hi, I have a tomcat 6 application which I have set parameters of -Xms512m -Xmx1024m. I thought 1 GB of memory in a 4 GB RAM would be enough, but that is not the case. On application stop/start multiple times (from tomcat manager) and also on image uploads (sometimes) I run into the OutOfMemory PermGen space error and the site stops responding. Should I increase the memory still some more? Is there anything else that I can do to from the tomcat side so that it does not run into the PermGen space issue? Thanks in advance for pointers/tips etc.

+4  A: 

The -Xmx option only affects the available heap space, and has no effect on the PermGen memory pool.

To increase the permgen pool beyond the 64MB default, use the -XX:MaxPermSize options, e.g.

-XX:MaxPermSize=256m

This is a Sun Hotspot VM-specific option, and likely won't work on other JVMs.

skaffman
A: 

This should help http://blogs.sun.com/fkieviet/entry/how_to_fix_the_dreaded.

P.M