Hi!

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!

Increasing the permgen size is not something I'm looking for. I'd rather prefer to see unused memory being deallocated.


Adriano


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

Reply via email to