标签:2-2 ppc apach [] The pre ref 项目 process
异常信息:
30-Aug-2018 15:59:34.900 SEVERE [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads The web application [] appears to have started a thread named [Thread-14] but has failed to stop it. This is very likely to create a memory leak. 30-Aug-2018 15:59:34.901 SEVERE [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads Stack trace of thread "Thread-14": sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) java.lang.Thread.run(Thread.java:748)
新项目使用log4j2+springmvc的方式,但是报这个错,查了很多资料,原因是log4j2-2.6开始引入shutdown(),在2.6中,如果web app卸载时没有进行shutdown(),tomcat会发布内存泄漏风险的告警。
<listener>
<listener-class>org.apache.logging.log4j.web.Log4jServletContextListener</listener-class>
</listener>
<context-param>
<param-name>isLog4jAutoInitializationDisabled</param-name>
<param-value>true</param-value>
</context-param>
sun.misc.Unsafe.park(Native Method)
标签:2-2 ppc apach [] The pre ref 项目 process
原文地址:https://www.cnblogs.com/Ai-Hen-Jiao-zhi/p/9560735.html