JVM memory leaks (OOM)! With you one second bomb [Secret]

We will introduce into multiple memory leaks OOM content, generally routine for the phenomenon, causes, solutions. Simple and clear, do not play on tall. Remember to look forward, ha ha


OOM most typical performance: java.lang.OutOfMemoryError, you remember it?


Review: the JVM memory leaks (OOM)! Secret with you one [first] bomb


Two phenomena 1 OOM

Today introduced the second GC overhead limit exceeded


2 What causes it?

1) the application has exhausted almost all of the available memory and GC has been unable to recover it


2) The official explanation: JVM spent 98% of the time for garbage collection, but received only 2% of the available memory, carry out frequent memory recall (at least five times in a row has been garbage collection), JVM will be exposed ava .lang.OutOfMemoryError: GC overhead limit exceeded error.


3 how to solve and avoid it?

1) increase the heap heap memory


2) Consider using G1GC garbage collection algorithm


3) Never use -XX: -UseGCOverheadLimit


Most of these objects where 4) you still looking for the most fundamental out which objects occupy stack in source code


Well, here today, the third bomb to meet tomorrow ~


Guess you like

Origin blog.51cto.com/xqtesting/2481910