'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.

For that we've decided using Chrome DevTools and take snapshots.

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:

enter image description here

Any idea how can we find the root cause for the blue lines ?



Solution 1:[1]

It seems that the memory is actually being released since the memory use goes down after a brief spike. It looks to me that this is more like a high instant need for memory then a memory leak. 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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 C. Szabo