Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6249

Eliminate log warnings and errors on server shutdown

XMLWordPrintable

    • 8

      When shutting down (or restarting) Magnolia e.g. in Tomcat 7 or 8, you'll see lots of exceptions (in development environment and in production set up):

      Jun 04, 2015 3:27:13 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
      WARNING: The web application [] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
      Jun 04, 2015 3:27:13 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
      WARNING: The web application [] appears to have started a thread named [com.google.inject.internal.util.$Finalizer] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
       java.lang.Object.wait(Native Method)
       java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
       java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
       com.google.inject.internal.util.$Finalizer.run(Finalizer.java:114)
      Jun 04, 2015 3:27:13 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
      SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.log4j.helpers.ThreadLocalMap] (value [org.apache.log4j.helpers.ThreadLocalMap@54013ecf]) and a value of type [java.util.Hashtable] (value [{Referer=http://37.44.0.106:20100/.magnolia/admincentral, SessionId=73C323210648AF26B40EAE61A381C99B, Remote-Host=212.120.50.178, User-Agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/8.0.6 Safari/600.6.3, requesturi=/.magnolia/admincentral/APP/global/0/legacy/1/graph1433431622625.png}]) 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.
      Jun 04, 2015 3:27:13 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
      SEVERE: The web application [] created a ThreadLocal with key of type [com.vaadin.util.CurrentInstance$1] (value [com.vaadin.util.CurrentInstance$1@1dc2b31f]) and a value of type [java.util.HashMap] (value [{class com.vaadin.server.VaadinSession=com.vaadin.util.CurrentInstance@597dc77c, class com.vaadin.server.VaadinService=com.vaadin.util.CurrentInstance@50b3cbca, class com.vaadin.ui.UI=com.vaadin.util.CurrentInstance@4c08642a}]) 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.
      Jun 04, 2015 3:27:13 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
      SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.log4j.helpers.ThreadLocalMap] (value [org.apache.log4j.helpers.ThreadLocalMap@54013ecf]) and a value of type [java.util.Hashtable] (value [{Referer=http://37.44.0.106:20100/.magnolia/admincentral, SessionId=73C323210648AF26B40EAE61A381C99B, Remote-Host=212.120.50.178, User-Agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/8.0.6 Safari/600.6.3, requesturi=/.magnolia/admincentral/UIDL/}]) 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.
      

      Might be that those are not hinting to real problems but already the fact they're flooding the logs is bad enough.

        Acceptance criteria

              Unassigned Unassigned
              dlipp Daniel Lipp
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:

                  Task DoR