https://issues.apache.org/bugzilla/show_bug.cgi?id=55674
Bug ID: 55674 Summary: ThreadLocal memory leak clean-up causes huge log Product: Tomcat 7 Version: 7.0.42 Hardware: All OS: All Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: ugo.scaie...@gmail.com ThreadLocal memory leak detection code is fine, but when it tries to clean-up ThreadLocal maps, it prints something like this in catalina.out: Oct 18, 2013 2:32:59 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/...] created a ThreadLocal with key of type [...] (value [...]) and a value of type [java.text.SimpleDateFormat] (value [java.text.SimpleDateFormat@6b2ed43a]) 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. Now, if the object contained in the ThreadLocal is very big and the toString method dumps all the data of that object, log could become very huge. Eg, in our application, we store a big HashMap in ThreadLocal and the trace above is about 700Mb because it recursively calls toString methods of all objects contained in the map. Is it necessary to log values contained in ThreadLocal maps during clean-up process? Additionaly, log level for that message is set to SEVERE and there's no way to specify logging details for that message. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org