搜尋

首頁  >  問答  >  主體

記憶體洩漏 - 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程式碼。

< /p>

黄舟黄舟2841 天前684

全部回覆(2)我來回復

  • ringa_lee

    ringa_lee2017-04-24 09:13:25

    看錯誤提示,應該是後台索引任務吃掉你的記憶了,試試看能不能停用索引。
    最好貼一下你最後使用的eclipse.ini
    永生代不需要設定的過大。

    修改了你的MaxPermSize設置,並增加了最大記憶體。

    -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

    回覆
    0
  • 阿神

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

    你好,這是我的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

    回覆
    0
  • 取消回覆