这个是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
分享到:
相关推荐
若在 jar 转加 dex 的过程中出现 java.lang.OutOfMemoryError: GC overhead limit exceeded 的错误,请调大 main.bat 中的 -Xmx 和 -Xss 其它: ============================================================...
poi读取大量数据会造成gc内存溢出的报错,由于垃圾回收机制无法将大量的对象及时的回收,而这些对象又会保存在内存中,会导致内存不够用的情况,这时候我们就需要使用新的方法,读取为cvs即可.此解决方案可支持千万数据的...
讲述如何在R语言中导入导出数据的PPT,一共28张
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、...
1. Java heap space 2. GC overhead limit exceeded 3. Permgen space 5. Unable to c
【情况一】 java.lang.OutOfMemoryError: Java heap space:这种是... java.lang.OutOfMemoryError: GC overhead limit exceeded 【解释】:JDK6新增错误类型,当GC为释放很小空间占用大量时间时抛出;一般是
如果您的游戏在启动时崩溃,并且崩溃日志中的行类似于Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded或Caused by: java.lang.OutOfMemoryError: Java heap space ,这是因为游戏的RAM不足了。...
有两个证据可以证明这一点: 对于随机生成的15个难题,DFS总是会出现以下错误: java.lang.OutOfMemoryError: GC overhead limit exceeded如果我通过改组最终状态难题来创建15个拼图,那么随着改组次数的增加,DFS...
由于需要使用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...