Monday, October 03, 2011

Tomcat 7 reveals log4j memory leak

We use MDC to log certain information in all traces

Tomcat 7 is notifying the following (As a difference with tomcat 6 which was silent):
SEVERE: The web application [/the-app] created a ThreadLocal with key of type [org.apache.log4j.helpers.ThreadLocalMap] (value [org.apache.log4j.helpers.ThreadLocalMap@757e5533]) and a value of type [java.util.Hashtable] (value [{sessionId=5366DB999B9EA1AC4CF30BED024BA44C, remoteAddress=127.0.0.1}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 

Solution

Still waiting for a resolution on a Log4j memory leak: https://issues.apache.org/bugzilla/show_bug.cgi?id=50486

No comments:

Followers