Hello all,
I am sorry, I need ask help here, but I already have post this issue
to 'Tomcat Users List' and was redirected to this list.
I use JBoss 4.0.3sp1 (with embedded Tomcat 5.5) and have problem
with JVM PermGen overflow. My application allows user to deploy
custom JSP pages to server. These JSP pages copied inside one
web-app without its redeploying. After several days of the system
work, classes of the compiled JSP pages overflow Java PermGen space.
It is needed to drop all references to classloader, to allow GC to
finalize classloader and free PermGen from classes loaded by it. But
Tomcat drop references to classloader only when web-application
undeployed.
To resolve this issue I have decide to replace JSP servlet (servlet
mapped to *.jsp) with my own implementation. My JSP servlet will call
JSP-compiler and load each compiled class by separate classloader
instance, which won't be references from anywhere. This will allow GC
to remove classloader and free PermGen.
I think this will help. Am I right? By the way, is there any
easier solution for described problem? All comments are welcome.
--
Nikita
PS1: I know, PermGen size can be increased with JVM option
-XX:PermSize. It helps, but it doesn't solve problem completely.
PS2: Deploying custom JSP pages by user is the primary design of my
system and can't be changed.
|