Stuff Goes Bad:Erlang In Anger

Chapter 7 Memory Leaks


There are truckloads of ways for an Erlang node to bleed memory. They go from extremely simple to astonishingly hard to figure out (fortunately, the latter type is also rarer), and it’s possible you’ll never encounter any problem with them.
 You will find out about memory leaks in two ways:

 1. A crash dump (see Chapter 6);
 2. By finding a worrisome trend in the data you are monitoring.
 This chapter will mostly focus on the latter kind of leak, because they’re easier to investigate and see grow in real time. We will focus on finding what is growing on the node and common remediation options, handling binary leaks (they’re a special case), and detecting memory fragmentation.

  1. crash dump文件(查看章节6);
  2. 通过找到你监控数据中的某些的异常项。