首页 > 技术文章 > java.lang.OutOfMemoryError : GC overhead limit exceeded解决方案

daochangone 2020-07-16 19:16 原文

IntelliJ IDEA  启动一个之前运行正常的项目失败,报错是:

java.lang.OutOfMemoryError : GC overhead limit exceeded

百度了一下,说是 IntelliJ IDEA 设置的内存太小,需要设置大一点。修改完成后,果然可以运行了,这里记录一下。

IntelliJ IDEA 中修改如下配置:

1、 File -> Settings -> Build,Execution,Deployment -> Complier 

       设置【Build process heap size(Mbytes)】 为 2000

2、File -> Settings -> Build,Execution,Deployment ->Build Tools -> Maven -> Importing 

       设置【VM options for importer】为 -Xmx1024m

进入 IntelliJ IDEA  的安装目录,找到文件 【idea64.exe.vmoptions】(如果是32位机器,修改【idea.exe.vmoptions】文件),修改配置为:

-Xms1024m
-Xmx2048m
-XX:ReservedCodeCacheSize=1024m

 

推荐阅读