'Node.JS: Can't figure out what's causing a memory leak (heap space)
After a few hours of running my node.js server, I get a "javascript heap space out of memory" error. I could increase it but the memory keeps going up so I don't think increasing the heap size will solve this.
I'm trying to use the chrome dev tools to figure out:
- What file this is occurring on
- What object/variable this is occurring on
But the chrome dev tools are so hard to read. I believe there's a memory leak somewhere in my program because the amount of memory keeps going up over time.
Is there a way to figure out what lines of code are possibly causing a memory leak or what objects are getting filled up with memory using the chrome dev tools?
When I take a heap snapshot using chrome dev tools, I look at the objects with the most memory but I can't figure out what objects these are in my code, there's no names of the variables or anything.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
