[Java] java.lang.OutOfMemoryError
The 8 symptoms that surface them
The many thousands of java.lang.OutOfMemoryErrors that I’ve met during my career all bear one of the below eight symptoms. This handbook explains what causes a particular error to be thrown, offers code examples that can cause such errors, and gives you solution guidelines for a fix. The content is all based on my own experience.
Index:
- java.lang.OutOfMemoryError: Java heap space
- java.lang.OutOfMemoryError: GC overhead limit exceeded
- java.lang.OutOfMemoryError: Permgen space
- java.lang.OutOfMemoryError: Metaspace
- java.lang.OutOfMemoryError: Unable to create new native thread
- java.lang.OutOfMemoryError: Out of swap space?
- java.lang.OutOfMemoryError: Requested array size exceeds VM limit
- java.lang.OutOfMemoryError: Kill process or sacrifice child