Aug 16, 2016 6:09:34 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:09:22 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:09:19 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:09:19 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:09:39 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:09:34 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:09:32 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:09:32 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:09:32 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:11:38 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:11:38 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:11:38 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
这是什么问题啊?服务器死了
刚开始没事,但是服务器运行一段时间,他就报这个错误,然后服务器就死了
INFO: Destroying Spring FrameworkServlet 'wap'
Aug 16, 2016 4:45:13 PM org.apache.catalina.core.ApplicationContext log
INFO: Shutting down log4j
Aug 16, 2016 4:45:13 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Aug 16, 2016 4:45:13 PM org.apache.catalina.core.ApplicationContext log
INFO: Destroying Spring FrameworkServlet 'wap'
Aug 16, 2016 4:45:13 PM org.apache.catalina.core.ApplicationContext log
INFO: Shutting down log4j
Aug 16, 2016 4:45:13 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Aug 16, 2016 4:45:15 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Aug 16, 2016 4:45:21 PM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'webapp.root' = [/home/apache-tomcat-6.0.33/webapps/scd/]
Aug 16, 2016 4:45:21 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from [/home/apache-tomcat-6.0.33/webapps/scd/WEB-INF/config/log4j.properties]
Aug 16, 2016 4:45:21 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'wap'
Aug 16, 2016 4:45:22 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Aug 16, 2016 4:45:22 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Aug 16, 2016 4:45:22 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Aug 16, 2016 4:45:27 PM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'webapp.root' = [/home/apache-tomcat-6.0.33/webapps/scd/]
Aug 16, 2016 4:45:27 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from [/home/apache-tomcat-6.0.33/webapps/scd/WEB-INF/config/log4j.properties]
Aug 16, 2016 4:45:27 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'wap'
Aug 16, 2016 6:09:09 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:09:09 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:09:09 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:09:09 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
Aug 16, 2016 6:09:09 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
内存栈溢出,应该是有什么一直在吃内存而又没有释放,导致溢出
log4j配置的日志里也没有抓到任何异常(级别是debug),会不会是log4j的原因呢?
JVM管理两种类型的内存,堆和非堆。堆是给开发人员用的,是在JVM启动时创建;非堆是留给JVM自己用的,用来存放类的信息的。它和堆不同,运行期内GC不会释放空间。如果 web app用了大量的第三方jar或者应用有太多的class文件而恰好MaxPermSize设置较小,超出了也会导致这块内存的占用过多造成溢出,或者 tomcat热部署时侯不会清理前面加载的环境,只会将context更改为新部署的,非堆存的内容就会越来越多。
可能是代码里有死循环,好好检查