Home  >  Q&A  >  body text

内存泄漏 - eclipse新建static web project,使用中一直提示GC overhead limit exceeded

我用eclipse新建了一个static web project,在使用过程中一直提示GC overhead limit exceeded,
我在百度也找了一些办法,比如不选择build automaticly,去掉不需要的validation,在eclipse的eclipse.ini中的-Xms和-Xmx设置大,将permsize也设置大,观察了一下,发现还是不断的在吞噬内存。

我觉的很奇怪,只不过是静态页面,为什么eclipse会不断的去做gc,又不需要编译java代码。

黄舟黄舟2734 days ago627

reply all(2)I'll reply

  • ringa_lee

    ringa_lee2017-04-24 09:13:25

    Looking at the error message, it seems that the background indexing task is eating up your memory. Try to see if you can disable indexing.
    It’s best to post the eclipse.ini you last used.
    The eternal generation does not need to be set too large.

    Modify your MaxPermSize setting and increase the maximum memory.

    -startup
    plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417
    -product
    org.eclipse.epp.package.jee.product
    --launcher.defaultAction
    openFile
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256m
    --launcher.defaultAction
    openFile
    --launcher.appendVmargs
    -vmargs
    -Dosgi.requiredJavaVersion=1.7
    -Xms512m
    -Xmx2048m

    reply
    0
  • 阿神

    阿神2017-04-24 09:13:25

    Hello, this is my eclipse.ini

    -startup
    plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417
    -product
    org.eclipse.epp.package.jee.product
    --launcher.defaultAction
    openFile
    --launcher.XXMaxPermSize
    1024M
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    1024m
    --launcher.defaultAction
    openFile
    --launcher.appendVmargs
    -vmargs
    -Dosgi.requiredJavaVersion=1.7
    -Xms1024m
    -Xmx1600m
    -XX:NewSize=256m
    -XX:MaxNewSize=256m

    reply
    0
  • Cancelreply