Java-OOM整理

OOM整理


    • java.lang.OutOfMemoryError: Java heap space
      • memory leaks
    • java.lang.OutOfMemoryError: GC overhead limit exceeded
      • The java.lang.OutOfMemoryError: GC overhead limit exceeded error is displayed when your application has exhausted pretty much all the available memory and GC has repeatedly failed to clean it.
      • GC overhead limt exceed檢查是Hotspot VM 1.6定義的一個(gè)策略,通過(guò)統(tǒng)計(jì)GC時(shí)間來(lái)預(yù)測(cè)是否要OOM了,提前拋出異常,防止OOM發(fā)生。Sun 官方對(duì)此的定義是:“并行/并發(fā)回收器在GC回收時(shí)間過(guò)長(zhǎng)時(shí)會(huì)拋出OutOfMemroyError。過(guò)長(zhǎng)的定義是,超過(guò)98%的時(shí)間用來(lái)做GC并且回收了不到2%的堆內(nèi)存。用來(lái)避免內(nèi)存過(guò)小造成應(yīng)用不能正常工作。
      • 98% of the total time doing GC and when after the GC only less than 2% of the heap is recovered.
      • UseGCOverheadLimit
    • java.lang.OutOfMemoryError: Permgen space
      • the main cause for the java.lang.OutOfMemoryError: PermGen space is that either too many classes or too big classes are loaded to the permanent generation.
    • java.lang.OutOfMemoryError: Metaspace
      • jdk8
    • java.lang.OutOfMemoryError: Unable to create new native thread
      • Java application has hit the limit of how many Threads it can launch.
    • java.lang.OutOfMemoryError: Out of swap space?
      • The java.lang.OutOfmemoryError: Out of swap space? is thrown by JVM when an allocation request for bytes from the native heap fails and the native heap is close to exhaustion.
    • java.lang.OutOfMemoryError: Requested array size exceeds VM limit
      • Increasing the length of the array by one to Integer.MAX_VALUE-1 results in the familiar OutOfMemoryError:
    • Out of memory: Kill process or sacrifice child
      • The Out of memory: kill process or sacrifice child error is generated when the available virtual memory (including swap) is consumed to the extent where the overall operating system stability is put to risk. In such case the Out of memory killer picks the rogue process and kills it.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Is GC Tuning Required? The memory size has been specified...
    lovePython閱讀 449評(píng)論 0 2
  • 在python中,以下數(shù)值會(huì)被認(rèn)為是False: 為0的數(shù)字,包括0,0.0 空字符串,包括'',"" ...
    SNC誓約閱讀 1,466評(píng)論 0 0
  • 鄆城縣押司宋公明,身為大宋朝最基層公務(wù)員,俸祿不算優(yōu)厚,家中兄弟和老父俱在村中務(wù)農(nóng),算不得豪強(qiáng)大戶、有錢人...
    雪飛江湖閱讀 675評(píng)論 0 0
  • 徐庶(生卒年不詳),字元直,潁川郡長(zhǎng)社縣(今河南許昌長(zhǎng)葛東)人。 東漢末年劉備帳下人物,后歸曹操,并仕于曹魏。徐庶...
    東方初城閱讀 1,788評(píng)論 0 1

友情鏈接更多精彩內(nèi)容