java.lang.OutOfMemoryError: GC overhead limit exceeded,gcoverheadlimit

來源:互聯網
上載者:User

java.lang.OutOfMemoryError: GC overhead limit exceeded,gcoverheadlimit

     今天現場weblogic報java.lang.OutOfMemoryError: GC overhead limit exceeded,在metalink查了下,有明確解釋,要設定一個JVM參數,不過由於當前weblogic記憶體設定為4G,所以設定參數的做法其實並不是解決問題之道,還是要分析weblogic 記憶體溢出檔案,得出是哪個功能有問題:

APPLIES TO:Oracle WebLogic Server - Version 10.3 and later
Information 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 stacktraceCAUSE

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 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


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.