1.
严重: Unexpected death of background thread ContainerBackgroundProcessor[StandardEngine[Catalina]] java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2957) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:519) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) at javax.servlet.GenericServlet.init(GenericServlet.java:158) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5266) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5554) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.StandardContext.reload(StandardContext.java:4033) at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:425) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1345) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1546) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1524) at java.lang.Thread.run(Thread.java:745) Exception in thread "Thread-15" java.lang.OutOfMemoryError: PermGen space at io.netty.util.internal.chmv8.ForkJoinPool.execute(ForkJoinPool.java:2557) at io.netty.util.concurrent.SingleThreadEventExecutor.scheduleExecution(SingleThreadEventExecutor.java:739) at io.netty.util.concurrent.SingleThreadEventExecutor.shutdownGracefully(SingleThreadEventExecutor.java:505) at io.netty.util.concurrent.MultithreadEventExecutorGroup.shutdownGracefully(MultithreadEventExecutorGroup.java:180) at io.netty.util.concurrent.AbstractEventExecutorGroup.shutdownGracefully(AbstractEventExecutorGroup.java:70) at com.zhht.platform.zhbcms.server.ZHBCmsServer.initZHBCmsMessageServer(ZHBCmsServer.java:38) at com.zhht.platform.zhbcms.server.ZHBCmsServer.access$0(ZHBCmsServer.java:26) at com.zhht.platform.zhbcms.server.ZHBCmsServer$1.run(ZHBCmsServer.java:69) at java.lang.Thread.run(Thread.java:745) Exception in thread "Thread-16" java.lang.OutOfMemoryError: PermGen space at io.netty.util.internal.chmv8.ForkJoinPool.execute(ForkJoinPool.java:2557) at io.netty.util.concurrent.SingleThreadEventExecutor.scheduleExecution(SingleThreadEventExecutor.java:739) at io.netty.util.concurrent.SingleThreadEventExecutor.shutdownGracefully(SingleThreadEventExecutor.java:505) at io.netty.util.concurrent.MultithreadEventExecutorGroup.shutdownGracefully(MultithreadEventExecutorGroup.java:180) at io.netty.util.concurrent.AbstractEventExecutorGroup.shutdownGracefully(AbstractEventExecutorGroup.java:70) at com.zhht.platform.zhbcms.server.ZHBCmsServer.initZHBCmsFileServer(ZHBCmsServer.java:58) at com.zhht.platform.zhbcms.server.ZHBCmsServer.access$1(ZHBCmsServer.java:46) at com.zhht.platform.zhbcms.server.ZHBCmsServer$2.run(ZHBCmsServer.java:79) at java.lang.Thread.run(Thread.java:745) Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2957) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:519) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) at javax.servlet.GenericServlet.init(GenericServlet.java:158) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5266) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5554) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.StandardContext.reload(StandardContext.java:4033) at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:425) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1345) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1546) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1524) at java.lang.Thread.run(Thread.java:745)
分析:
先看一下内存使用情况
总大小 已使用
堆 2036M 73M (上下浮动)
栈 82M 81M
运行这段代码
class TimerThread extends Thread { /** * This flag is set to false by the reaper to inform us that there * are no more live references to our Timer object. Once this flag * is true and there are no more tasks in our queue, there is no * work left for us to do, so we terminate gracefully. Note that * this field is protected by queue's monitor! */ boolean newTasksMayBeScheduled = true; /** * Our Timer's queue. We store this reference in preference to * a reference to the Timer so the reference graph remains acyclic. * Otherwise, the Timer would never be garbage-collected and this * thread would never go away. */ private TaskQueue queue; TimerThread(TaskQueue queue) { this.queue = queue; } public void run() { try { mainLoop(); } finally { // Someone killed this Thread, behave as if Timer cancelled synchronized(queue) { newTasksMayBeScheduled = false; queue.clear(); // Eliminate obsolete references } } }报出
Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2957) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:519) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) at javax.servlet.GenericServlet.init(GenericServlet.java:158)
相关推荐
Tomcat内存溢出之解决方法 Tomcat内存溢出是指Tomcat服务器在处理大数据量时出现的内存溢出错误,导致系统崩溃或返回HTTP状态码500的错误页面。本文将详细介绍Tomcat内存溢出之解决方法,包括问题分析、解决方法和...
在生产环境中tomcat内存设置不好很容易出现内存溢出。造成内存原因是不一样的,当然处理方式也不一样。本文就介绍了Tomcat内存溢出的三种情况及解决办法分析
本篇将详细介绍如何解决Tomcat内存溢出的问题,以及如何进行相应的配置优化。 首先,我们需要理解什么是内存溢出。当一个程序在运行过程中,分配给它的内存不足以存储所有数据时,就会发生内存溢出。在Java环境中,...
### Java Excel导出Tomcat内存溢出处理方法 在Java应用开发过程中,特别是在进行大量数据处理如Excel导出等操作时,经常会遇到Tomcat服务器内存溢出的问题。内存溢出是指程序运行时申请的内存超过了系统能提供的...
### Eclipse + Tomcat 内存溢出参数设置详解 在Java开发过程中,特别是在使用Eclipse作为集成开发环境(IDE)并结合Apache Tomcat服务器进行Web应用开发时,经常会遇到内存溢出的问题。这类问题通常表现为应用程序...
LINUX部署tomcat内存溢出解决方案 已经使用过了,确实是好用的。
项目在tomcat下运行时,出现常见的几种内存溢出的解决方案
### Eclipse Memory Analyzer (MAT) 分析 Tomcat 内存溢出详解 #### 一、引言 在软件开发过程中,特别是在 Java 应用程序中,内存管理是非常关键的一环。当应用程序遭遇 `OutOfMemoryError` 异常时,通常意味着...
### Tomcat内存溢出在不同系统上的解决方案 #### 一、引言 在部署和运维基于Java的应用程序时,Tomcat作为广泛使用的轻量级Web容器之一,常常会在高负载或资源管理不当的情况下遭遇内存溢出的问题。内存溢出不仅会...
【Tomcat内存溢出解决办法】 Tomcat是Apache软件基金会的一个开源项目,作为一个流行的Java Servlet容器,它常用于部署和运行Java Web应用程序。内存溢出问题(Out of Memory Error,OOME)在高负载或长时间运行的...
### Tomcat内存溢出总结 在生产环境部署和运行基于Java的应用时,合理配置Tomcat服务器的内存参数至关重要。不当的内存配置不仅可能导致应用性能下降,严重时甚至会引起服务不可用的问题。本文将针对常见的几种内存...
Tomcat内存溢出是Java应用程序中常见的问题,尤其是在运行大型Web应用程序时。内存溢出会导致系统性能下降,甚至服务崩溃。以下是对Tomcat内存溢出的三种常见类型的详细解释及解决策略。 1. OutOfMemoryError: Java...
标题中的“tomcat内存溢出问题.doc”表明讨论的主题是关于Tomcat服务器遇到的内存溢出(Out Of Memory,OOM)问题,特别是与Java的PermGen空间相关的内存溢出。描述提到,这个问题是因为Tomcat的初始内存设置过小,...