Tenho enfrentado problemas de memory leak com minha aplicação no Tomcat. Já resolvi vários problemas e várias APIs já resolveram problemas também relacionados.
Atualmente, encontrei problema com esta API. Ela registra threads mas não finaliza a mesma, o que ocasiona no redeploy o vazamento, já que o Tomcat não consegue remover estas threads.
Não investiguei muito o porque de existirem registro de threads para formatação de texto, já que o Java já possui métodos nativos para isto. De qualquer maneira é necessário criar um método de remoção das threads no redeploy.
Segue o log abaixo:
16-Aug-2016 08:39:56.853 SEVERE [http-nio-8080-exec-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [] created a ThreadLocal with key of type [org.jrimum.utilix.text.DecimalFormat$1] (value [org.jrimum.utilix.text.DecimalFormat$1@376d996b]) and a value of type [java.text.DecimalFormat] (value [java.text.DecimalFormat@7ad2a]) 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.
16-Aug-2016 08:39:56.853 SEVERE [http-nio-8080-exec-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [] created a ThreadLocal with key of type [org.jrimum.utilix.text.DateFormat$1] (value [org.jrimum.utilix.text.DateFormat$1@14ff2c9f]) and a value of type [java.text.SimpleDateFormat] (value [java.text.SimpleDateFormat@d936eac0]) 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.
16-Aug-2016 08:39:56.854 SEVERE [http-nio-8080-exec-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [] created a ThreadLocal with key of type [org.jrimum.utilix.text.DecimalFormat$1] (value [org.jrimum.utilix.text.DecimalFormat$1@376d996b]) and a value of type [java.text.DecimalFormat] (value [java.text.DecimalFormat@7ad2a]) 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.
16-Aug-2016 08:39:56.854 SEVERE [http-nio-8080-exec-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [] created a ThreadLocal with key of type [org.jrimum.utilix.text.DateFormat$1] (value [org.jrimum.utilix.text.DateFormat$1@14ff2c9f]) and a value of type [java.text.SimpleDateFormat] (value [java.text.SimpleDateFormat@d936eac0]) 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.
16-Aug-2016 08:39:56.854 SEVERE [http-nio-8080-exec-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [] created a ThreadLocal with key of type [org.jrimum.utilix.text.DecimalFormat$1] (value [org.jrimum.utilix.text.DecimalFormat$1@376d996b]) and a value of type [java.text.DecimalFormat] (value [java.text.DecimalFormat@7ad2a]) 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.
16-Aug-2016 08:39:56.854 SEVERE [http-nio-8080-exec-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [] created a ThreadLocal with key of type [org.jrimum.utilix.text.DateFormat$1] (value [org.jrimum.utilix.text.DateFormat$1@14ff2c9f]) and a value of type [java.text.SimpleDateFormat] (value [java.text.SimpleDateFormat@d936eac0]) 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.
16-Aug-2016 08:39:56.854 SEVERE [http-nio-8080-exec-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [] created a ThreadLocal with key of type [org.jrimum.utilix.text.DateFormat$1] (value [org.jrimum.utilix.text.DateFormat$1@14ff2c9f]) and a value of type [java.text.SimpleDateFormat] (value [java.text.SimpleDateFormat@d936eac0]) 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.
16-Aug-2016 08:39:56.855 SEVERE [http-nio-8080-exec-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [] created a ThreadLocal with key of type [org.jrimum.utilix.text.DecimalFormat$1] (value [org.jrimum.utilix.text.DecimalFormat$1@376d996b]) and a value of type [java.text.DecimalFormat] (value [java.text.DecimalFormat@7ad2a]) 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.
Tenho enfrentado problemas de memory leak com minha aplicação no Tomcat. Já resolvi vários problemas e várias APIs já resolveram problemas também relacionados.
Atualmente, encontrei problema com esta API. Ela registra threads mas não finaliza a mesma, o que ocasiona no redeploy o vazamento, já que o Tomcat não consegue remover estas threads.
Não investiguei muito o porque de existirem registro de threads para formatação de texto, já que o Java já possui métodos nativos para isto. De qualquer maneira é necessário criar um método de remoção das threads no redeploy.
Segue o log abaixo: