I'm developing an application with appfuse. Everything is working well, but when i deploy it on Tomcat (6 and 7), i get the next error: Perm gen space.
I modified catalina.bat file adding this line:
set JAVA_OPTS="-Xmx1024M -XX:PermSize=512m -XX:MaxPermSize=1024m -Djava.awt.headless=true -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC"
The webApp is working very fast, but after few clicks i get the error that i have commented before. How can i avoid this??
EDIT
I'm usin appfuse 2.2.1
EDIT 2 The graph at top right show permGen use... is it normal?
EDIT 3
When Used memory == Max size in my dev enviroment this is what happens (but not in my production enviroment):
Dev enviroment:
Windows 7 - jdk1.6 - mysql 5.1 - tomcat 6 - 7
Production enviroment:
Windows server 2008 - R2 ISAPI Filter to get working tomcat on IIS - Tested on Tomcat 6 and 7 - Mysql 5.1 - jdk1.6
Memory profiler: