Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification.
The "MemoryLeakProtection" page has been changed by SylvainLaurent. http://wiki.apache.org/tomcat/MemoryLeakProtection?action=diff&rev1=12&rev2=13 -------------------------------------------------- - ''' !! This page is under construction !! ''' - For some time Tomcat has had some means of protection against memory leaks when stopping or redeploying applications. This page tries to list them, and shows the situations where leaks can be detected and fixed. @@ -27, +25 @@ ||[[#cclThreadSpawnedByWebApp|ContextClassLoader / Threads spawned by webapps]]||>=6.0.24||In 6.0.24-6.0.26 {{{TimerThread}}} are stopped but it may lead to problems. Optional from 6.0.27 with the {{{clearReferencesStopTimerThreads}}} flag. Other threads may be stopped with the {{{clearReferencesStopThreads}}} flag, but it's unsafe. ||[[#48837|Detect child classloaders]], Fix the application to stop the thread when the application is stopped|| ||[[#cclThreadSpawnedByCommonClassLoader|ContextClassLoader / Threads spawned by classes loaded by the common classloader]]||>=6.0.24||In 6.0.24-6.0.26 {{{TimerThread}}} are stopped but it may lead to problems. Optional from 6.0.27 with the {{{clearReferencesStopTimerThreads}}} flag. Other threads may be stopped with the {{{clearReferencesStopThreads}}} flag, but it's unsafe. ||[[#48837|Detect child classloaders]], fix the offending code (set the correct CCL when spawning the thread)|| ||[[#cclThreadSpawnedByJRE|ContextClassLoader / Threads spawned by JRE classes]]|| no || >=6.0.24 pre-spawns some known offenders || || - ||[[#staticClassVariables|static class variables]]|| no ||> 6.0.? || || + ||[[#staticClassVariables|static class variables]]|| no ||> 6.0.? . Disabled by default with tomcat 7|| || ||[[#LogFactory|LogFactory]]|| ||> 6.0.? || || ||[[#jdbc|JDBC driver registration]]|| > 6.0.? ||> 6.0.? || || ||[[#rmiTarget|RMI Target]]|| ||> 6.0.? || || @@ -402, +400 @@ Related issues * <<Anchor(48837)>>[[https://issues.apache.org/bugzilla/show_bug.cgi?id=48837|48837]] - Memory leaks protection does not cure leaks triggered by JSP pages code - * <<Anchor(48895)>>[[https://issues.apache.org/bugzilla/show_bug.cgi?id=48895|48895]] - !WebAppClassLoader.clearThreadLocalMap() concurrency issues - * <<Anchor(48971)>>[[https://issues.apache.org/bugzilla/show_bug.cgi?id=48971|48971]] - memory leak protection : stopping !TimerThreads should be optional and disabled by default * <<Anchor(49159)>>[[https://issues.apache.org/bugzilla/show_bug.cgi?id= 49159|49159]] - Improve ThreadLocal memory leak clean-up * [[http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4957990|Sun bug 4957990]] - In some cases the Server JVM fails to collect classloaders. According to [[http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4957990|this page]] it should have been fixed with java 6u16 but actually it was not. It seems to be fixed with 6u21 (documented [[http://download.java.net/jdk6/6u21/promoted/b03/changes/JDK6u21.list.html|here]] and verified by the author of this wiki page). --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org