"http-8080-3" java.lang.OutOfMemoryError: PermGen space C3P0死锁的问题

时间:2022-04-28 18:37:22
Exception in thread ""http-bio-8080"-exec-1" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Druid-ConnectionPool-Destory" java.lang.OutOfMemoryError: PermGen space
        at java.util.IdentityHashMap.keySet(IdentityHashMap.java:935)
        at com.alibaba.druid.pool.DruidDataSource.removeAbandoned(DruidDataSource.java:1312)
        at com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:1294)
Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.lang.OutOfMemoryError: PermGen space

 

解决办法:

 

 先在eclipse安装目录中将eclipse的启动参数调大一些

Java code
 
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
openFile
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion= 1.6
-Xms128m
-Xmx1024m



然后在eclipse的server栏,找到tomcat选项,打开tomcat的配置
"http-8080-3" java.lang.OutOfMemoryError: PermGen space C3P0死锁的问题
在arguments 标签框下面的VM Arguments 框后面接上自己的tomcat启动虚拟机参数就可以了
"http-8080-3" java.lang.OutOfMemoryError: PermGen space C3P0死锁的问题

 

 

同样也解决了该项目在运行过程中出现的C3P0死锁的问题