tomcat运行一段时间后自动关闭,求大家帮忙分析下

a20081225 2017-07-18 04:19:15
项目部署在tomcat上,持续运行大概1-2个月左右,期间程序可正常运行,但是报错后tomcat就无法连接到数据库,只能看到登录界面。报错显示各种停止,最后跳到提示端口号被占用,但是除此tomcat启动外并无其他任何有关java的程序开启。
个人分析有可能是内存溢出或者数据库连接池的问题,但是具体原因和解决办法不知。
请各位大神帮忙分析一下,谢谢!
六月 24, 2017 4:13:54 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["http-apr-8080"]
六月 24, 2017 4:13:54 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["ajp-apr-8009"]
六月 24, 2017 4:13:54 下午 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service Catalina
六月 24, 2017 4:13:56 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/KQZB] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
六月 24, 2017 4:13:56 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/KQZB] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
六月 24, 2017 4:13:56 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/KQZB] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] but has failed to stop it. This is very likely to create a memory leak.
六月 24, 2017 4:13:56 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/KQZB] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] but has failed to stop it. This is very likely to create a memory leak.
六月 24, 2017 4:13:56 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/KQZB] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] but has failed to stop it. This is very likely to create a memory leak.
六月 24, 2017 4:13:56 下午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/KQZB] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@e81725]) and a value of type [java.lang.Class] (value [class oracle.sql.AnyDataFactory]) 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.
六月 24, 2017 4:13:56 下午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/KQZB] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@147b4f8]) and a value of type [java.lang.Class] (value [class oracle.sql.TypeDescriptorFactory]) 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.
六月 24, 2017 4:13:56 下午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/KQZB] created a ThreadLocal with key of type [net.sf.json.AbstractJSON.CycleSet] (value [net.sf.json.AbstractJSON$CycleSet@1c37ed5]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@1bbe551]) 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.
六月 24, 2017 4:13:56 下午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/KQZB] created a ThreadLocal with key of type [org.apache.xmlbeans.XmlBeans$1] (value [org.apache.xmlbeans.XmlBeans$1@cc4c9b]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@b96e2b]) 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.
六月 24, 2017 4:13:56 下午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/KQZB] created a ThreadLocal with key of type [org.apache.xmlbeans.impl.store.Locale$1] (value [org.apache.xmlbeans.impl.store.Locale$1@1efca72]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@1d43185]) 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.
六月 24, 2017 4:13:56 下午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/KQZB] created a ThreadLocal with key of type [org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl$1] (value [org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl$1@1ff41dc]) and a value of type [java.util.ArrayList] (value [[java.lang.ref.SoftReference@13cf771]]) 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.
六月 24, 2017 4:13:56 下午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/KQZB] created a ThreadLocal with key of type [net.sf.json.AbstractJSON.CycleSet] (value [net.sf.json.AbstractJSON$CycleSet@1c37ed5]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@1994040]) 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.

因日志字符串过长中间有所省略,大约10行左右,但报错信息都是一个模式如下(中括号内的内容不同其余一样):
六月 24, 2017 4:13:56 下午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/KQZB] created a ThreadLocal with key of type [***] (value [****]) and a value of type [****] (value [****]) 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.

六月 24, 2017 4:13:56 下午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/KQZB] created a ThreadLocal with key of type [net.sf.json.AbstractJSON.CycleSet] (value [net.sf.json.AbstractJSON$CycleSet@1c37ed5]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@169fd]) 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.
六月 24, 2017 4:13:56 下午 org.apache.coyote.AbstractProtocol stop
信息: Stopping ProtocolHandler ["http-apr-8080"]
六月 24, 2017 4:14:16 下午 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.4.8.
六月 24, 2017 4:14:16 下午 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
六月 24, 2017 4:14:18 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL successfully initialized (OpenSSL 1.0.1e 11 Feb 2013)
六月 24, 2017 4:14:20 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-apr-8080"]
六月 24, 2017 4:14:20 下午 org.apache.coyote.AbstractProtocol init
严重: Failed to initialize end point associated with ProtocolHandler ["http-apr-8080"]
java.lang.Exception: Socket listen failed: [730055] ???????????????×??ò???????ú????????????
at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:435)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:640)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:813)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:280)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)
...全文
1567 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
stacksoverflow 2019-01-11
  • 打赏
  • 举报
回复
参考一下: https://stackoverflow.com/questions/3320400/to-prevent-a-memory-leak-the-jdbc-driver-has-been-forcibly-unregistered
lifewell1 2017-08-02
  • 打赏
  • 举报
回复
说明数据库连接最大值,没办法在连接,重启下,估计你项目没事务控制没关闭,也可能数据库锁表了
nikyotensai 2017-08-02
  • 打赏
  • 举报
回复
这东西只能看前人的经验之谈
tianfang 2017-08-02
  • 打赏
  • 举报
回复
还是数据库相关代码有问题。 为了排除c3p0的问题,换个连接池试试 ,比如阿里的 Druid
a20081225 2017-07-31
  • 打赏
  • 举报
回复
今天重新启动时候又出现同样问题,已对tomcat进行优化,代码检查过,无效链接应该被释放了,求大神们看看
一个治疗术 2017-07-20
  • 打赏
  • 举报
回复
个人认为应该是数据库的某些连接用完之后没有关闭,然后连接池设置的超时时间大于数据设置的最大过期时间,导致连接一直未释放。 这是谋杀
tianfang 2017-07-20
  • 打赏
  • 举报
回复
使用ThreadLocal  传递的参数未释放,导致内存泄漏,仔细检查相关代码
oO临时工Oo 2017-07-18
  • 打赏
  • 举报
回复
java.lang.Exception: Socket listen failed: [730055] ???????????????×??ò???????ú???????????? at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:435) tomcat绑定本地端口730055错误,最大的端口只能是65535。操作系统不支持大于65535的端口。自己检察tomcat配置中的端口配置

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧