简体   繁体   English

Memory 使用 Chrome-DevTools 的 NODEJS 泄漏 - 获取导致 memory 泄漏和应用崩溃的变量?

[英]Memory Leaks in NODEJS With Chrome-DevTools - Get variables that are causing memory leaks and App to crush?

We're experiencing crushes with our NODEJS app, for some reason we have somewhere in the code some variables that are not getting released, and they should be.我们的 NODEJS 应用程序遇到了问题,由于某种原因,我们在代码中的某个地方有一些变量没有被释放,它们应该被释放。

For that we've decided using Chrome DevTools and take snapshots.为此,我们决定使用 Chrome DevTools 并拍摄快照。

However I can't seem to find the source for the memory that's not getting released in seconds 6, 12 and 14, here in the red circles:但是我似乎找不到 memory 的来源,它没有在第 6、12 和 14 秒内发布,在红色圆圈中:

在此处输入图像描述

Any idea how can we find the root cause for the blue lines?知道我们如何找到蓝线的根本原因吗?

It seems that the memory is actually being released since the memory use goes down after a brief spike.似乎 memory 实际上正在发布,因为 memory 在短暂的峰值后使用下降。 It looks to me that this is more like a high instant need for memory then a memory leak.在我看来,这更像是对 memory 的高度即时需求,然后是 memory 泄漏。 Try to correlate this with the logs and see what was happening at that time.尝试将其与日志相关联,看看当时发生了什么。 From the picture you posted you seem to have a lot of strings and arrays in memory.从您发布的图片来看,您似乎在 memory 中有很多字符串和 arrays。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM