java.lang.OutOfMemoryError: GC overhead limit exceeded
2015-06-25 13:21
525 查看
今天现场weblogic报java.lang.OutOfMemoryError: GC overhead limit exceeded,在metalink查了下,有明确解释,要设置一个JVM参数,不过由于当前weblogic内存设置为4G,所以设置参数的做法其实并不是解决问题之道,还是要分析weblogic 内存溢出文件,得出是哪个功能有问题:
Oracle WebLogic Server - Version 10.3 and later
Information in this document applies to any platform.
***Checked for relevance on 22-Oct-2014***
Issue of getting below "java.lang.OutOfMemoryError: GC overhead limit exceeded" exception in WebLogic 10.3 and above versions was reported when running with Sun JDK 1.6 with all fix packs:
Sep 30, 2010 4:13:27 PM CDT> <Error> <Kernel> <BEA-000802> <ExecuteRequest failed
java.lang.OutOfMemoryError: GC overhead limit exceeded.
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOfRange(Arrays.java:3209)
at java.lang.String.<init>(String.java:216)
at java.lang.StringBuilder.toString(StringBuilder.java:430)
at weblogic.servlet.internal.ServletRequestImpl.toString(ServletRequestImpl.java:243)
at java.lang.String.valueOf(String.java:2827)
Truncated. see log file for complete stacktrace
The "java.lang.OutOfMemoryError: GC overhead limit exceeded" message means that for some reason the garbage collector is taking an excessive amount of time.
The parallel 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 or less than 2% of the heap is recovered by garbage collection, an OutOfMemoryError
will be thrown.
This feature of throwing "GC overhead limit exceeded" message 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.
--原因是垃圾回收器由于某些原因花了很长时间,并行的垃圾回收器抛出内存溢出的错误,要么是花了很长时间做GC的操作,或是只有2%的堆内存又来回收。GC overhead limit exceeded被设计出来,是为了阻止应用程序运行的时候,由于堆内存设置的小而没有进展。
You can avoid the above "java.lang.OutOfMemoryError: GC overhead limit exceeded" exception by disabling the GC overhead limit feature in Sun JDK 1.6 by adding the following argument to the
start script of JVM:
-XX:-UseGCOverheadLimit
However, please note that disabling the overhead limit only avoids getting the OutOfMemoryError at an early stage. The OutOfMemoryError is very likely to be thrown at a later stage, because
it does not remove the underlying problem. You should still look into your application and JVM settings to find the cause of GC taking an excessively long time.
--避免这种错误,在JVM中显示设置-XX:-UseGCOverheadLimit
APPLIES TO:
Oracle WebLogic Server - Version 10.3 and laterInformation in this document applies to any platform.
***Checked for relevance on 22-Oct-2014***
SYMPTOMS
Issue of getting below "java.lang.OutOfMemoryError: GC overhead limit exceeded" exception in WebLogic 10.3 and above versions was reported when running with Sun JDK 1.6 with all fix packs:Sep 30, 2010 4:13:27 PM CDT> <Error> <Kernel> <BEA-000802> <ExecuteRequest failed
java.lang.OutOfMemoryError: GC overhead limit exceeded.
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOfRange(Arrays.java:3209)
at java.lang.String.<init>(String.java:216)
at java.lang.StringBuilder.toString(StringBuilder.java:430)
at weblogic.servlet.internal.ServletRequestImpl.toString(ServletRequestImpl.java:243)
at java.lang.String.valueOf(String.java:2827)
Truncated. see log file for complete stacktrace
CAUSE
The "java.lang.OutOfMemoryError: GC overhead limit exceeded" message means that for some reason the garbage collector is taking an excessive amount of time.The parallel 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 or less than 2% of the heap is recovered by garbage collection, an OutOfMemoryError
will be thrown.
This feature of throwing "GC overhead limit exceeded" message 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.
--原因是垃圾回收器由于某些原因花了很长时间,并行的垃圾回收器抛出内存溢出的错误,要么是花了很长时间做GC的操作,或是只有2%的堆内存又来回收。GC overhead limit exceeded被设计出来,是为了阻止应用程序运行的时候,由于堆内存设置的小而没有进展。
SOLUTION
You can avoid the above "java.lang.OutOfMemoryError: GC overhead limit exceeded" exception by disabling the GC overhead limit feature in Sun JDK 1.6 by adding the following argument to thestart script of JVM:
-XX:-UseGCOverheadLimit
However, please note that disabling the overhead limit only avoids getting the OutOfMemoryError at an early stage. The OutOfMemoryError is very likely to be thrown at a later stage, because
it does not remove the underlying problem. You should still look into your application and JVM settings to find the cause of GC taking an excessively long time.
--避免这种错误,在JVM中显示设置-XX:-UseGCOverheadLimit
相关文章推荐
- 在火狐插件中使用socket编程与java进行通信
- 关于java中String类型的split方法问题
- Java使用正则表达式对日期类型进行格式转换
- 推荐一个修改文件编码的eclipse插件
- Java抽象类与接口的区别
- java 导出为 jar 包
- eclipse的项目导入到myelipse里面去要这么做!
- org.w3c.dom(java dom)解析XML文档
- plupload上传插件在SpringMVC中的整合
- JAVA设计模式(01):创建型-工厂模式【工厂方法模式】(Factory Method)
- 在使用Eclipse Debug JDK时,看不到变量值的解决办法
- Java读取配置文件方法及文件路径注意事项
- “找女神要QQ号码”——java篇
- java学习之旅15、16--eclipse开发环境的使用_建立java项目_运行java项目,eclipse运行程序的问题(src和bin问题)_debug模式
- spring@Transactional注解
- bean之间的复制!BeanUtils.copyProperties、set、BeanCopier还有spring中的BeanUtils.copyProperties之间的区别
- Solr JAVA客户端SolrJ 4.9使用示例教程
- webmagic的设计机制及原理-如何开发一个Java爬虫
- 软件开发应试人员考试试题(Java)
- intellij的一些设置和快捷键