/outofmemoryerror

实例详解 java.lang.OutOfMemoryError

Apache License 2.0Apache-2.0

java.lang.OutOfMemoryError 实例详解

The 8 symptoms that surface them

内存溢出的8种主要类型

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.

笔者在工作中碰到过成千上万的 java.lang.OutOfMemoryError, 都可以归结为以下八种症状。 本手册阐述了各种内存溢出错误的形成原因,并提供了可测试这种错误的示例代码,以及解决方案。 内容都来源于笔者的一线开发和实践经验。

目录:

  1. OutOfMemoryError系列(1): Java heap space
  2. OutOfMemoryError系列(2): GC overhead limit exceeded
  3. OutOfMemoryError系列(3): Permgen space
  4. OutOfMemoryError系列(4): Metaspace
  5. OutOfMemoryError系列(5): Unable to create new native thread
  6. OutOfMemoryError系列(6): Out of swap space? 
  7. OutOfMemoryError系列(7): Requested array size exceeds VM limit Details
  8. OutOfMemoryError系列(8): Kill process or sacrifice child

原文作者: Nikita Salnikov-Tarnovski -- Plumbr Co-Founder and VP of Engineering

原文链接: https://plumbr.eu/outofmemoryerror