Dear Adriano,

As I had having OutOfMemory exceptions (PermGen) when redeploying an application, I started to verify things using Eclipse Memory Analyzer.

I've discovered some real leaks, for example caused by the Java Disposer thread being instantiated using the Webapp classloader. After fix this, when I redeploy the application, Memory Analyzer shows that there are no non-weak/soft references to the undeployed classloader. But it (and the classes allocated by it) is never garbaged collected.

I've tried different VM switches (-XX:+CMS*) and none make the classloader be collected. Thinking about word "Perm" (permanent) and some sources, I've done non-web testing and there a custom classloader *is* garbaged collected.

So what could be the problem when running in Tomcat?

I'm using Tomcat 6.0.18, JDK 1.6.0-10 (Linux and Windows) and Apache Wicket. I've not put any libraries in <tomcat>/lib, they are all on the WEB-INF/lib. Wicket uses ThreadGlobals, but I don't think this may be a problem, because Eclipse Memory Analyzer seems to show references from them, but it didn't show any references in my case!

Here's some more discussion in that subject. http://java-monitor.com/forum/showthread.php?t=7 In particular, that thread suggests you read http://opensource.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669 for some known permgen leak offenders. Perhaps some of these might give you more corners to peel at for your application?
--
Kees Jan

http://java-monitor.com/forum/
kjkos...@kjkoster.org
06-51838192

Human beings make life so interesting. Do you know that in a universe so full of wonders, they have managed to invent boredom. Quite astonishing... -- Terry Pratchett


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to