`
langzhiwang888
  • 浏览: 176808 次
  • 性别: Icon_minigender_1
  • 来自: 青岛
社区版块
存档分类
最新评论

java.lang.OutOfMemoryError: GC overhead limit exceeded

 
阅读更多

 

这个是JDK6新添的错误类型。是发生在GC占用大量时间为释放很小空间的时候发生的,是一种保护机制。解决方案是,关闭该功能,使用—— -XX:-UseGCOverheadLimit

 

这里要查看是否有使用大内存的代码或死循环。

 

Sun官方解释:

The parallel / concurrent collector will throw an OutOfMemoryError if too much time is being spent in garbage collection: if more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered, an OutOfMemoryError will be thrown. This feature is designed to prevent applications from running for an extended period of time while making little or no progress because the heap is too small. If necessary, this feature can be disabled by adding the option -XX:-UseGCOverheadLimit to the command line

 

 

 

 

 

一、异常如下:
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded

 

二、解释:
JDK6新增错误类型。当GC为释放很小空间占用大量时间时抛出。
一般是因为堆太小。导致异常的原因:没有足够的内存。

 

三、解决方案:

1、查看系统是否有使用大内存的代码或死循环。
2、可以添加JVM的启动参数来限制使用内存:-XX:-UseGCOverheadLimit

分享到:
评论
1 楼 zfms 2013-03-26  
-XX:-UseGCOverheadLimit

具体有什么用?

相关推荐

    SmaliInjector20170719

    若在 jar 转加 dex 的过程中出现 java.lang.OutOfMemoryError: GC overhead limit exceeded 的错误,请调大 main.bat 中的 -Xmx 和 -Xss 其它: ============================================================...

    poi大量数据读取gc内存溢出解决方案

    poi读取大量数据会造成gc内存溢出的报错,由于垃圾回收机制无法将大量的对象及时的回收,而这些对象又会保存在内存中,会导致内存不够用的情况,这时候我们就需要使用新的方法,读取为cvs即可.此解决方案可支持千万数据的...

    R语言导入导出数据方法介绍

    讲述如何在R语言中导入导出数据的PPT,一共28张

    OutOfMemoryError Handbook

    OutOfMemoryError的8种经典案例,Java heap space、GC overhead limit exceeded、Permgen space、Metaspace、Unable to create new native thread、Out of swap space?、Requested array size exceeds VM limit、...

    系统稳定性——OutOfMemoryError常见原因及解决方法1

    1. Java heap space 2. GC overhead limit exceeded 3. Permgen space 5. Unable to c

    关于java堆内存溢出的几种情况

    【情况一】  java.lang.OutOfMemoryError: Java heap space:这种是...  java.lang.OutOfMemoryError: GC overhead limit exceeded  【解释】:JDK6新增错误类型,当GC为释放很小空间占用大量时间时抛出;一般是

    FTB-Presents-Stoneblock-2

    如果您的游戏在启动时崩溃,并且崩溃日志中的行类似于Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded或Caused by: java.lang.OutOfMemoryError: Java heap space ,这是因为游戏的RAM不足了。...

    sliding-block-puzzle:使用搜索算法解决滑块难题

    有两个证据可以证明这一点: 对于随机生成的15个难题,DFS总是会出现以下错误: java.lang.OutOfMemoryError: GC overhead limit exceeded如果我通过改组最终状态难题来创建15个拼图,那么随着改组次数的增加,DFS...

    Eclipse下使用ANT编译提示OutOfMemory的解决方法

    由于需要使用ANT编译的代码比较多,特别是在第一次变异的时候,会出现OutOfMemory错误。并提示更改ANT_OPTS设定。

    微信小程序用户信息解密失败导致的内存泄漏问题

    java.lang.OutOfMemoryError: GC overhead limit exceeded   at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:426) at javax.crypto.JarVerifier.verifyJars(JarVerifier.java:322) at javax.crypto...

Global site tag (gtag.js) - Google Analytics