线上服务器tomcat老是莫名其妙自动停止问题

背景

有时候无意间打开自己的网站发现挂了,看下访问日志,发现已经挂了好几天了!尼玛,这还了得啊!今天又碰到了,因为没有做监控,服务挂了也不知道,刚开始还以为是服务器被谁攻击了,三天两头挂掉,今天查了一下,发现是系统内存太满,自动把tomcat进程给杀死的!

执行vim /var/log/messages即可看到如下信息:

解决

解决方法要么是给tomcat增大内存配置,要么是把tomcat加入受保护进程,不让系统把它杀死,但是根本原因还是服务器内存本身太小了(只有1G),所以改这些配置也是没啥意义。唯一要做的就是弄一个监控机制,内存溢出自动重启,或者发邮件提醒,这个暂时没弄,等有空来弄一下,所以本文有待更新!

已标记关键词 清除标记
运行在 windows2008 的 tomcat服务过一段段时间tomcat就会自动停止服务 不知道那个log有用 就都放桑过来了 catalina.2015-07-16.log 2015-7-16 9:35:32 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\tomcat\jdk1.6.0_10\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\tomcat\jdk1.6.0_10\bin 2015-7-16 9:35:32 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2015-7-16 9:35:32 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 659 ms 2015-7-16 9:35:32 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2015-7-16 9:35:32 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.18 2015-7-16 9:35:34 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8080 2015-7-16 9:35:34 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2015-7-16 9:35:34 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/32 config=null 2015-7-16 9:35:34 org.apache.catalina.startup.Catalina start 信息: Server startup in 1311 ms 2015-7-16 9:42:42 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\tomcat\jdk1.6.0_10\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\tomcat\jdk1.6.0_10\bin 2015-7-16 9:42:42 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2015-7-16 9:42:42 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 519 ms 2015-7-16 9:42:42 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2015-7-16 9:42:42 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.18 2015-7-16 9:42:55 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8080 2015-7-16 9:42:56 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2015-7-16 9:42:56 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/31 config=null 2015-7-16 9:42:56 org.apache.catalina.startup.Catalina start 信息: Server startup in 13633 ms 2015-7-16 9:47:56 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\tomcat\jdk1.6.0_10\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\tomcat\jdk1.6.0_10\bin 2015-7-16 9:47:56 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-80 2015-7-16 9:47:56 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 469 ms 2015-7-16 9:47:56 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2015-7-16 9:47:56 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.18 2015-7-16 9:48:08 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-80 2015-7-16 9:48:08 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2015-7-16 9:48:08 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/32 config=null 2015-7-16 9:48:08 org.apache.catalina.startup.Catalina start 信息: Server startup in 12095 ms 2015-7-16 10:26:30 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\tomcat\jdk1.6.0_10\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin;C:\Program Files (x86)\tomcat\jdk1.6.0_10\bin 2015-7-16 10:26:30 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-80 2015-7-16 10:26:30 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 465 ms 2015-7-16 10:26:30 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2015-7-16 10:26:30 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.18 2015-7-16 10:26:39 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-80 2015-7-16 10:26:39 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2015-7-16 10:26:39 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/32 config=null 2015-7-16 10:26:39 org.apache.catalina.startup.Catalina start 信息: Server startup in 9109 ms 2015-7-16 10:39:23 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\tomcat\jdk1.6.0_10\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin;C:\Program Files (x86)\tomcat\jdk1.6.0_10\bin 2015-7-16 10:39:23 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-80 2015-7-16 10:39:23 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 1024 ms 2015-7-16 10:39:24 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2015-7-16 10:39:24 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.18 2015-7-16 10:39:37 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-80 2015-7-16 10:39:38 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2015-7-16 10:39:38 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/31 config=null 2015-7-16 10:39:38 org.apache.catalina.startup.Catalina start 信息: Server startup in 13993 ms 2015-7-16 11:42:12 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\tomcat\jdk1.6.0_10\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin;C:\Program Files (x86)\tomcat\jdk1.6.0_10\bin 2015-7-16 11:42:13 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-80 2015-7-16 11:42:13 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 645 ms 2015-7-16 11:42:13 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2015-7-16 11:42:13 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.18 2015-7-16 11:42:24 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-80 2015-7-16 11:42:24 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2015-7-16 11:42:24 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/32 config=null 2015-7-16 11:42:24 org.apache.catalina.startup.Catalina start 信息: Server startup in 11526 ms
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页