简体   繁体   中英

Memory leaks in nodejs (express.js)

I faced the issue of memory leaks in nodejs (express.js), I tried some tutorials on the internet but in their case, the leaky class is quite clear and not so hard to detect. In my case, I can detect the Constructor of leaky class is Unit8Array (using chrome dev tool), but, I do not know why I have tons of them (260139 instances) and it leads to memory leaks

Thanks in advance for helping, I stuck in this for long times.

堆分析器

Finally, I found the answer for my issue, it is in the core of node when writing to many small chunks with stream (in my case is logging to file)

https://github.com/nodejs/node-v0.x-archive/pull/8826

I saw that it has a patch to fix this issue on node-v0.xx but I'm using node-v0.12.4 but it is still there. When I upgraded to node-v5.9.0, the leaks disappeared.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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