mayifan0
MMMMMMMMMMemory
采纳率100%
2016-08-18 03:43 浏览 6.1k
已采纳

tomcat经常挂掉,过程如下

5

八月 18, 2016 10:59:13 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["http-apr-9996"]
八月 18, 2016 10:59:13 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["ajp-apr-8021"]
八月 18, 2016 10:59:13 上午 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service Catalina
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/] registered the JDBC driver [com.mysql.fabric.jdbc.FabricMySQLDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/] appears to have started a thread named [FileWatchdog] but has failed to stop it. This is very likely to create a memory leak.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/] created a ThreadLocal with key of type com.google.gson.Gson$1 and a value of type java.util.HashMap but failed to remove it when the web application was stopped. Threads are going t
o be renewed over time to try and avoid a probable memory leak.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/] created a ThreadLocal with key of type com.google.gson.Gson$1 and a value of type java.util.HashMap but failed to remove it when the web application was stopped. Threads are going t
o be renewed over time to try and avoid a probable memory leak.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/] created a ThreadLocal with key of type com.google.gson.Gson$1 and a value of type java.util.HashMap but failed to remove it when the web application was stopped. Threads are going t
o be renewed over time to try and avoid a probable memory leak.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/] created a ThreadLocal with key of type com.google.gson.Gson$1 and a value of type java.util.HashMap but failed to remove it when the web application was stopped. Threads are going t
o be renewed over time to try and avoid a probable memory leak.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/] created a ThreadLocal with key of type java.lang.ThreadLocal and a value of type com.yunze.bcpt.service.pay.weixinpay.common.Configure.Account but failed to remove it when the web app
lication was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
"/home/tomcat/bcpt/weixin/logs/catalina.out" 710295L, 232929613C 710150,1 99%
严重: The web application [/] created a ThreadLocal with key of type com.google.gson.Gson$1 and a value of type java.util.HashMap but failed to remove it when the web application was stopped. Threads are going t
o be renewed over time to try and avoid a probable memory leak.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/] created a ThreadLocal with key of type com.google.gson.Gson$1 and a value of type java.util.HashMap but failed to remove it when the web application was stopped. Threads are going t
o be renewed over time to try and avoid a probable memory leak.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/] created a ThreadLocal with key of type com.google.gson.Gson$1 and a value of type java.util.HashMap but failed to remove it when the web application was stopped. Threads are going t
o be renewed over time to try and avoid a probable memory leak.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/] created a ThreadLocal with key of type com.google.gson.Gson$1 and a value of type java.util.HashMap but failed to remove it when the web application was stopped. Threads are going t
o be renewed over time to try and avoid a probable memory leak.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/] created a ThreadLocal with key of type com.google.gson.Gson$1 and a value of type java.util.HashMap 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.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/] created a ThreadLocal with key of type com.google.gson.Gson$1 and a value of type java.util.HashMap but failed to remove it when the web application was stopped. Threads are going t
o be renewed over time to try and avoid a probable memory leak.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/] created a ThreadLocal with key of type com.google.gson.Gson$1 and a value of type java.util.HashMap but failed to remove it when the web application was stopped. Threads are going t
o be renewed over time to try and avoid a probable memory leak.
八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/] created a ThreadLocal with key of type com.google.gson.Gson$1 and a value of type java.util.HashMap but failed to remove it when the web application was stopped. Threads are going t
o be renewed over time to try and avoid a probable memory leak.
八月 18, 2016 10:59:13 上午 org.apache.coyote.AbstractProtocol stop
信息: Stopping ProtocolHandler ["http-apr-9996"]
八月 18, 2016 10:59:13 上午 org.apache.coyote.AbstractProtocol stop
信息: Stopping ProtocolHandler ["ajp-apr-8021"]
八月 18, 2016 10:59:13 上午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["http-apr-9996"]
八月 18, 2016 10:59:13 上午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["ajp-apr-8021"]

这个是catlina.out在程序每次挂掉前的输出,没有其他的错误日志

export JAVA_OPTS="-server -Xms650m -Xmx650m -Xmn260m -XX:PermSize=256m -XX:MaxPermSize=256m -Xss256K -XX:+DisableExplicitGC -XX:SurvivorRatio=2 -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=1 -XX:
+CMSClassUnloadingEnabled -XX:LargePageSizeInBytes=128M -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Djava.awt.headless=true -XX:+PrintClassHistogram -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -
Xloggc:/var/log/gc.log -XX:ErrorFile=/var/log/hs_err_pid.log"

多次调试还是会挂,这是目前的JVM参数,同时还运行了另一个tomcat实例,但那一个就不会挂,感谢各位大神指点

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答 默认 最新

  • 已采纳
    Marksinoberg 泰 戈 尔 2016-08-18 22:18

    我个人觉得是驱动版本问题(O_O)?,换个合适的jdbc驱动包试试图片说明

    点赞 评论 复制链接分享
  • xlc136692938 xlc136692938 2016-08-18 04:34

    可能是端口抢占问题,你改改端口号。

    点赞 评论 复制链接分享
  • theUncle paavochan 2016-08-18 06:22

    从抛错来看,是你的数据库jdbc Driver的问题。建议更换和你mysql版本对应的的jdbc驱动包。

    点赞 评论 复制链接分享
  • niaonao niaonao 2016-08-18 07:20
     registered the JDBC driver [com.mysql.fabric.jdbc.FabricMySQLDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
    

    注册(com.mysql.fabric.jdbc JDBC驱动程序。FabricMySQLDriver),但没有注销的web应用程序时停止。为了防止内存泄漏,已经强行未登记的JDBC驱动程序。

    https://issues.apache.org/jira/browse/DBCP-332

    点赞 评论 复制链接分享
  • u013519020 兰前小驻 2016-08-18 11:09

    你下看看JDBC放的目录是否是WebRoot-->WEB-INF-->lib
    再看看jdbc的jar包是否加载,可在对应jar包上右键 build path-->Add to build path
    另外,Tomcat最好用6或者7. 7的话用jdk1.7就可以了
    再者,尽量不要使用编译工具自带的那个tomcat,从官网下载一个。

    点赞 评论 复制链接分享

相关推荐