Repository navigation
Memory Leak Help #21
Description
Activity
Can you post numbers? Is it VMEM or RSS that is growing? Have you tried node-inspector or node-heapdump yet?
when i have a fresh deploy:
RES ~70mbafter one day:
RES ~100mbafter a couple of days i had 30% memory usage (1GB max):
RES ~300mbwe played only with memwatch a little. but i thought there is an obvious memory leak problem in the code. if you say "no there isn't", i will investigate using more tools.
thanks a lot!
@kirrg001 What OS are you running and which Node version?
node v0.10.33
Linux version 3.14.48-33.39.amzn1.x86_64 (mockbuild@gobi-build-60007) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Tue Jul 14 23:43:07 UTC 2015Here is an example on how to use v8-profiler to create heapdumps if memory is constantly climbing: https://github.com/proxy/gist.github.com/danielkhan/0a98ae0ae2b5ddfd443e
You can the load this into chrome developer tools. Try to get 3 dumps. one from the start, one after some time and one after an equal amount of time.
In chrome developer tools you can display the difference between two heap dumps. This might show you the data structures that are constantly growing = your leak.Here's also a slide deck on this topic: www.slideshare.net/DanielKhan3/hunting-performance-problems-in-nodejs.
300 MB RSS doesn't seem that out of the ordinary to me. The garbage collector will opportunistically grow the heap so it's not unexpected that RSS (and VMEM too) go up over time. It should plateau when it reaches the hard limit (~1.5 GB by default, configurable with
--max_old_space_size.)
hey!
i discovered that one of my files is causing a memory leak. the memory grows over days. i'm checking everyday with htop and it grows every day more and more. i don't understand what is the reason for the memory leak. i hope somebody can help me.
Thanks
kirrg