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

后端 未结 1 1717
滥情空心
滥情空心 2021-02-10 17:50

I am trying to debug a high memory usage situation in a node.js service thats touching almost 1.5 GB of Resident memory usage according to top. I need to see which objects are t

相关标签:
1条回答
  • 2021-02-10 18:34

    You can try :

    1. nodetime: See the docs on how to profile memory. A blog on how to detect memory leaks. It can show the largest memory blocks in the heap.
    2. node-inspector with v8-profiler: Heap snapshots may be taken and viewed from the profiles panel.

    To use the inbuilt V8 profiler from command line you can :

    1. To build from source: node-gyp configure build install
    2. Or, if you have npm installed: npm install profiler (See profiler for more details)

    You can see other profilers mentioned here and here.

    0 讨论(0)
提交回复
热议问题