Threads are going to be renewed over time to try and avoid a probable memory leak

天大地大妈咪最大 提交于 2021-02-08 14:00:07

问题


I try to deploy my war file.

But after success deployment.

I get this log:

[root@dfdfdf bin]# export JAVA_HOME="/usr/java/jdk1.8.0_112/"
[root@dfdfdfdbin]# ./startup.sh
Using CATALINA_BASE:   /root/apache-tomcat-8.5.8
Using CATALINA_HOME:   /root/apache-tomcat-8.5.8
Using CATALINA_TMPDIR: /root/apache-tomcat-8.5.8/temp
Using JRE_HOME:        /usr/java/jdk1.8.0_112/
Using CLASSPATH:       /root/apache-tomcat-8.5.8/bin/bootstrap.jar:/root/apache-tomcat-8.5.8/bin/tomcat-juli.jar
Tomcat started.
[root@satubangau bin]# tail -f ../logs/catalina.out
06-Feb-2017 07:21:27.881 SEVERE [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Request attributes]) and a value of type [org.grails.web.servlet.mvc.GrailsWebRequest] (value [ServletWebRequest: uri=/error]) 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.
06-Feb-2017 07:21:27.986 INFO [Thread-17] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-80"]
06-Feb-2017 07:21:27.988 INFO [Thread-17] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["https-jsse-nio-443"]
06-Feb-2017 07:21:27.994 INFO [Thread-17] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
06-Feb-2017 07:21:27.995 INFO [Thread-17] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-80"]
06-Feb-2017 07:21:27.996 INFO [Thread-17] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["https-jsse-nio-443"]
06-Feb-2017 07:21:27.997 INFO [Thread-17] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
/root/apache-tomcat-8.5.8/bin/catalina.sh: line 434: /usr/java/jdk1.8.0_111/bin/java: No such file or directory
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
06-Feb-2017 07:54:26.688 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.8
06-Feb-2017 07:54:26.691 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Nov 3 2016 21:14:13 UTC
06-Feb-2017 07:54:26.692 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.8.0
06-Feb-2017 07:54:26.692 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
06-Feb-2017 07:54:26.694 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            4.0.4-042stab120.16
06-Feb-2017 07:54:26.694 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
06-Feb-2017 07:54:26.694 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/java/jdk1.8.0_112/jre
06-Feb-2017 07:54:26.695 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_112-b15
06-Feb-2017 07:54:26.695 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
06-Feb-2017 07:54:26.695 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /root/apache-tomcat-8.5.8
06-Feb-2017 07:54:26.696 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /root/apache-tomcat-8.5.8
06-Feb-2017 07:54:26.697 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/root/apache-tomcat-8.5.8/conf/logging.properties
06-Feb-2017 07:54:26.697 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
06-Feb-2017 07:54:26.698 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
06-Feb-2017 07:54:26.699 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
06-Feb-2017 07:54:26.700 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms256m
06-Feb-2017 07:54:26.700 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx512M
06-Feb-2017 07:54:26.700 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:PermSize=256m
06-Feb-2017 07:54:26.701 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=256m
06-Feb-2017 07:54:26.701 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:-UseGCOverheadLimit
06-Feb-2017 07:54:26.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:-PrintGCDetails
06-Feb-2017 07:54:26.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
06-Feb-2017 07:54:26.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF-8
06-Feb-2017 07:54:26.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/root/apache-tomcat-8.5.8
06-Feb-2017 07:54:26.777 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/root/apache-tomcat-8.5.8
06-Feb-2017 07:54:26.777 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/root/apache-tomcat-8.5.8/temp
06-Feb-2017 07:54:26.777 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
06-Feb-2017 07:54:27.777 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]
06-Feb-2017 07:54:27.882 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
06-Feb-2017 07:54:27.887 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-jsse-nio-443"]
06-Feb-2017 07:54:29.784 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
06-Feb-2017 07:54:29.790 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
06-Feb-2017 07:54:29.792 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
06-Feb-2017 07:54:29.795 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 6017 ms
06-Feb-2017 07:54:29.986 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
06-Feb-2017 07:54:29.987 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.8
06-Feb-2017 07:54:30.098 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /root/apache-tomcat-8.5.8/webapps/ROOT.war
06-Feb-2017 07:55:07.702 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

Configuring Spring Security Core ...
... finished configuring Spring Security Core

see this line

06-Feb-2017 07:21:27.881 SEVERE [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Request attributes]) and a value of type [org.grails.web.servlet.mvc.GrailsWebRequest] (value [ServletWebRequest: uri=/error]) 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.

I don't know why I get this log, but I am using grails 3.1.1 .

I wonder, this message is talking about my Application or server's condition.


回答1:


I have already faced the same problem, also got solution from Here. This problem occurred in the Application server. However, application server also communicated with memcached server. After observation, got memcached server memory was full. After restart memcached then everything is fine.

If you are using Redis, also can check.



来源:https://stackoverflow.com/questions/42063002/threads-are-going-to-be-renewed-over-time-to-try-and-avoid-a-probable-memory-lea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!