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定義的一個策略确憨,通過統(tǒng)計GC時間來預(yù)測是否要OOM了,提前拋出異常瓤的,防止OOM發(fā)生。Sun 官方對此的定義是:“并行/并發(fā)回收器在GC回收時間過長時會拋出OutOfMemroyError吞歼。過長的定義是圈膏,超過98%的時間用來做GC并且回收了不到2%的堆內(nèi)存。用來避免內(nèi)存過小造成應(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.
- References