这个是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
本文解析了JDK6中新增的GCOverheadLimit错误,这是一种当垃圾回收消耗过多时间而实际回收空间很小时触发的错误。文章提供了关闭此功能的方法,并建议检查是否存在大内存占用或死循环的情况。
7285

被折叠的 条评论
为什么被折叠?



