码迷,mamicode.com
首页 > 系统相关 > 详细

eclipse使用jetty插件出现内存溢出解决方案

时间:2016-08-11 12:49:39      阅读:225      评论:0      收藏:0      [点我收藏+]

标签:

     系统运行在MAVEN中的jetty插件下,当在ECLIPSE运 clean jetty:run时系统提示 OutOfMemoryError: PermGen space。

 
解决办法:
设置run as --->run configuragtions--->jre标签下的 属性VM arguments:

-server -Xms512m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -XX:+PrintGCDetails -Xloggc:%M2_HOME%/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%M2_HOME%/java_pid.hprof

其中参数说明如下:

-XX:+CMSPermGenSweepingEnabled : 允许permgenspace的垃圾回收

-XX:+CMSClassUnloadingEnabled : allows the garbage collector to remove even classes from the memory

-XX:PermSize=256M -XX:MaxPermSize=256M : raises the amount of memory allocated to the permgenspace

解决失败用例:
1.在系统环境变量中添加 MAVEN_OPTS="-Xms40m -Xmx512m -XX:PermSize=512m" 不行,

2.在eclipse.ini文件中添加 -Xms40m -Xmx512m -XX:PermSize=512m 也不行。

3. run as --->run configuragtions--->jre标签下的 属性VM arguments:

-Xms512m -Xmx1024m

eclipse使用jetty插件出现内存溢出解决方案

标签:

原文地址:http://www.cnblogs.com/shangxiaofei/p/5760308.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!