Node.JS process uses 1.4 GB of memory, but heapdump is only 300 MB

社会主义新天地 提交于 2019-12-04 10:35:17

Maybe node-memwatch could help you?

https://github.com/lloyd/node-memwatch

From its Readme:

node-memwatch is here to help you detect and find memory leaks in Node.JS code. It provides:

A leak event, emitted when it appears your code is leaking memory.

A stats event, emitted occasionally, giving you data describing your heap usage and trends over time.

A HeapDiff class that lets you compare the state of your heap between two points in time, telling you what has been allocated, and what has been released.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!