Summary: | Memory leak after undeploying web application using custom log formatter | ||
---|---|---|---|
Product: | Tomcat 6 | Reporter: | dsavickas |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 6.0.20 | ||
Target Milestone: | default | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Attachments: | Zipped Maven project folder |
Created attachment 24819 [details] Zipped Maven project folder After undeploying web application (see attachment) instance of CustomFormatter is left non-reclaimed. As CustomFormatter is loaded by WebAppClassLoader, the classloader remains in memory too. To reproduce: deploy attached web application and stop/start it several times, then do a heap dump. Check the dump using Eclipse Memory Analyzer or YourKit Java Profiler and notice multiple WebAppClassLoaders present in the dump. Issue seems to be related to org.apache.juli.ClassLoaderLogManager. org.apache.juli.ClassLoaderLogManager$LogNode keeps a reference to java.util.logging.Logger. Logger has a handler with CustomFormatter.