Is there a tool for node.js that will give me a list of all the objects on the heap indicated by their class name string?

I am trying to debug a situation with the use of large memory in the node.js service, which concerns almost 1.5 GB of memory usage of residency according to the top. I need to find out which objects are the culprits of use.

+4
source share
1 answer

You can try:

  • nodetime : see docs on how to profile memory. A blog on how to detect memory leaks. It can display the largest memory blocks on the heap.
  • node-inspector with v8-profiler : a bunch of snapshots can be taken and viewed from the profiles panel.

To use the V8 built-in profiler from the command line, you can:

  • To build from source: node-gyp configure build install
  • Or, if you have npm installed: npm install profiler (For details, see profiler )

You can see the other profilers mentioned here here and here .

+2
source

Source: https://habr.com/ru/post/950957/


All Articles