线程-tomcat7 PermGen space 每天一次

问题描述

tomcat7 PermGen space 每天一次 50C
Exception in thread ""http-bio-443-exec-1832"" at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395)
at sun.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:94)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:48)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.security.Provider$Service.newInstance(Provider.java:1240)
at javax.crypto.Cipher.chooseProvider(Cipher.java:845)
at javax.crypto.Cipher.init(Cipher.java:1348)
at sun.security.ssl.CipherBox.(CipherBox.java:175)
at sun.security.ssl.CipherBox.newCipherBox(CipherBox.java:208)
at sun.security.ssl.CipherSuite$BulkCipher.newCipher(CipherSuite.java:471)
at sun.security.ssl.Handshaker.newReadCipher(Handshaker.java:707)
at sun.security.ssl.SSLSocketImpl.changeReadCiphers(SSLSocketImpl.java:2063)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1117)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
at sun.security.ssl.SSLSocketImpl.getSession(SSLSocketImpl.java:2191)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactory.java:252)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
java.lang.OutOfMemoryError: PermGen space
at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395)
at sun.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:94)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:48)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.security.Provider$Service.newInstance(Provider.java:1240)
at javax.crypto.Cipher.chooseProvider(Cipher.java:845)
at javax.crypto.Cipher.init(Cipher.java:1348)
at sun.security.ssl.CipherBox.(CipherBox.java:175)
at sun.security.ssl.CipherBox.newCipherBox(CipherBox.java:208)
at sun.security.ssl.CipherSuite$BulkCipher.newCipher(CipherSuite.java:471)
at sun.security.ssl.Handshaker.newReadCipher(Handshaker.java:707)
at sun.security.ssl.SSLSocketImpl.changeReadCiphers(SSLSocketImpl.java:2063)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1117)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
at sun.security.ssl.SSLSocketImpl.getSession(SSLSocketImpl.java:2191)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactory.java:252)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
java.lang.OutOfMemoryError: PermGen space
at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395)
at sun.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:94)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:48)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.security.Provider$Service.newInstance(Provider.java:1240)
at javax.crypto.Cipher.chooseProvider(Cipher.java:845)
at javax.crypto.Cipher.init(Cipher.java:1348)
at sun.security.ssl.CipherBox.(CipherBox.java:175)
at sun.security.ssl.CipherBox.newCipherBox(CipherBox.java:208)
at sun.security.ssl.CipherSuite$BulkCipher.newCipher(CipherSuite.java:471)
at sun.security.ssl.Handshaker.newReadCipher(Handshaker.java:707)
at sun.security.ssl.SSLSocketImpl.changeReadCiphers(SSLSocketImpl.java:2063)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1117)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
at sun.security.ssl.SSLSocketImpl.getSession(SSLSocketImpl.java:2191)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactory.java:252)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
java.lang.OutOfMemoryError: PermGen space
at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395)
at sun.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:94)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:48)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.security.Provider$Service.newInstance(Provider.java:1240)
at javax.crypto.Cipher.chooseProvider(Cipher.java:845)
at javax.crypto.Cipher.init(Cipher.java:1348)
at sun.security.ssl.CipherBox.(CipherBox.java:175)
at sun.security.ssl.CipherBox.newCipherBox(CipherBox.java:208)
at sun.security.ssl.CipherSuite$BulkCipher.newCipher(CipherSuite.java:471)
at sun.security.ssl.Handshaker.newReadCipher(Handshaker.java:707)
at sun.security.ssl.SSLSocketImpl.changeReadCiphers(SSLSocketImpl.java:2063)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1117)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
at sun.security.ssl.SSLSocketImpl.getSession(SSLSocketImpl.java:2191)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactory.java:252)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Exception in thread ""http-bio-443-exec-2025"" java.lang.OutOfMemoryError: PermGen space

解决方案

tomcat 7 jdk7 Struts2 +spring +hibernate4 框架,,

解决方案二:
set JAVA_OPTS=-Xms512m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=2048m

每天一次,内存会突然一下大起来,然后就溢出了

解决方案三:
我的每天出现这个错误多次,基本上重发布几次就会报这个错,目前没发现解决的方法

解决方案四:
看到都头晕了,望采纳

解决方案五:
一般大起来就是对象太多,垃圾回收机制没有及时收回空间,这,你优化一下,还不行么?

解决方案六:
优化过了还是不行,用测试工具多个线程去跑,并没有看到内存增加,内存有时候是突然一下子增大的

解决方案七:
PermGen space与Tomcat
tomcat部署多个应用出现PermGen space

时间: 2025-01-01 14:47:25

线程-tomcat7 PermGen space 每天一次的相关文章

tomcat-java.lang.OutOfMemoryError: PermGen space

问题描述 java.lang.OutOfMemoryError: PermGen space 项目是用:Spring+Struts2+Mybatis开发的, 服务器:Tomcat7.x IDE:MyEclipse10 在项目启动时报内存溢出异常(java.lang.OutOfMemoryError: PermGen space) 解决方案 感谢各位大神的热心帮助.问题解决了,解决过程如下:Window --> Preferences --> MyEclipse --> Servers -

Tomcat – java.lang.OutOfMemoryError: PermGen space Cause and Solution

Read more: http://javarevisited.blogspot.com/2012/01/tomcat-javalangoutofmemoryerror-permgen.html#ixzz3QDWa3Zqi Tomcat web server often suffers from java.lang.OutOfMemoryError: PermGen space whenever you deploy and undeploy your web application coupl

eclipse的Unhandled event loop exception PermGen space问题

原来一直用eclipse3.5,最近尝试升级到3.7和4.2,但不管是3.7还是4.2项目编译过程中总提示"Unhandled event loop exception PermGen space"要求退出workspace,与原来3.5版本比较了一下eclipse.ini参数设置发现没有差别,怀疑是公司自己开发的插件问题,马上删除自己的插件,但还是遇到同样问题,郁闷只好去google求助. 搜索到的第一个解决方案是设置PermSize和MaxPermSize参数,避免耗光永久保存区内

tomcat-启动项目时!一直报错 OutOfMemoryError: PermGen space

问题描述 启动项目时!一直报错 OutOfMemoryError: PermGen space java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect

java.lang.OutOfMemoryError: PermGen space: java reflection

原文地址:https://stackoverflow.com/questions/16130292/java-lang-outofmemoryerror-permgen-space-java-reflection/47090043#47090043 问题 使用如下java反射代码: Method method = LogFactory.class.getDeclaredMethod("getContextClassLoader"); method.setAccessible(true)

tomcat-求帮忙解决下Tomcat的OutOfMemoryError: PermGen space问题

问题描述 求帮忙解决下Tomcat的OutOfMemoryError: PermGen space问题 我用的是MyEclipse2014,tomcat是8.x的,困扰了很久了,下面是我的配置,但是好像没啥用 解决方案 这个不是内存的问题吗?可以搜索myeclipse修改内存配置http://jingyan.baidu.com/article/f7ff0bfc73f54f2e26bb138c.html 解决方案二: http://www.cnblogs.com/cyjch/archive/201

java.lang.OutOfMemoryError: PermGen space及其解决方法

PermGen space的全称是Permanent Generation space,是指内存的永久保存区域OutOfMemoryError: PermGen space从表面上看就是内存益出,解决方法也一定是加大内存.说说为什么会内存益出:这一部分用于存放Class和Meta的信息,Class在被 Load的时候被放入PermGen space区域,它和和存放Instance的Heap区域不同,GC(Garbage Collection)不会在主程序运行期对PermGen space进行清理

【JAVA秒会技术之异常解决】怎么解决eclipse报PermGen space异常的问题

在Eclipse使用JDK1.7及以下版本做开发时,用tomcat在启动时,经常会报这样一个错误: Caused by: java.lang.OutOfMemoryError: PermGen space. 解决办法1: 换成JDK1.8.因为JDK1.8已经将永久代移除堆内存. 解决办法2: 点击"Run"-"Run Configurations",在打开的窗口中点击"Arguments"选项卡. 在VM arguments中内容最下边输入:

公司的系統點擊一個功能的時候報java.lang.OutOfMemoryError: PermGen space

问题描述 在公司的系統中點擊了一個打印的功能,前臺是用flex,后臺是java,打印的時候是彈出來一個jsp頁面,中間夾了大量的計算.在本地測試沒事 可以彈出來jsp頁面,但是放在測試機上時候就會報如下異常,我在測試服務器的環境變量里設置了 变名:JAVA_OPTS 变量值:-Xms1024m -Xmx1024m 還是沒有作用,不知道應該怎么處理了.是程序的問題嗎?java.lang.OutOfMemoryError: PermGen spaceat java.lang.ClassLoader.