admin管理员组文章数量:1287957
I am using HAPI.JS framework with NodeJS and created a proxy. Think that proxy means i am just maintaining session in redis. Other than that i am not doing anything in the code. May be only thing is i am using setInterval to log my process.memoryUsage() for every 3 mintues.
My Questions:
- Why my Memory Keeps on Increasing?
- Will it get down?
- Is this occurs due to setInterval keeps on logging the process usage?
- Is this occurs due to console logging of every request and response?
- My Redis Database is kept open till my server crashes, it this causes this ?
- Do i need use process mananger like new relic or strong loop to identify this?
- So how long this memory will keep on increasing, at some point it must stop (i want to know which point is that?)
- I am using sequelize of MSSQL transaction using pooling concept? Does pooling makes this?
P.S I am new to node JS.
I am using HAPI.JS framework with NodeJS and created a proxy. Think that proxy means i am just maintaining session in redis. Other than that i am not doing anything in the code. May be only thing is i am using setInterval to log my process.memoryUsage() for every 3 mintues.
My Questions:
- Why my Memory Keeps on Increasing?
- Will it get down?
- Is this occurs due to setInterval keeps on logging the process usage?
- Is this occurs due to console logging of every request and response?
- My Redis Database is kept open till my server crashes, it this causes this ?
- Do i need use process mananger like new relic or strong loop to identify this?
- So how long this memory will keep on increasing, at some point it must stop (i want to know which point is that?)
- I am using sequelize of MSSQL transaction using pooling concept? Does pooling makes this?
P.S I am new to node JS.
Share Improve this question asked Apr 17, 2015 at 7:27 SathishSathish 2,1903 gold badges27 silver badges45 bronze badges 4- could you show your code - sounds like it isn't that much. – Philipp Kyeck Commented Apr 17, 2015 at 10:54
- @pkyeck Sorry mate. it is not possible to show my code.This is my implementation, list of routes, each route call another server and serves that response to the client. I am using request module to call another server. All my routes are protected by token based authentication. – Sathish Commented Apr 17, 2015 at 12:01
- Your app is leaking memory but w/o seeing the sourcecode it's impossible to say why. You can try to follow these steps to find the leak: github./felixge/node-memory-leak-tutorial – Philipp Kyeck Commented Apr 17, 2015 at 12:06
- @pkyeck Can you tell me y that is happening from list of above questions. – Sathish Commented Apr 17, 2015 at 12:10
1 Answer
Reset to default 9
- Why my Memory Keeps on Increasing?
You got a memory leak
- Will it get down?
Sometimes GC kicks in and cleans up some things (that are not leaking)
- Is this occurs due to setInterval keeps on logging the process usage?
- Is this occurs due to console logging of every request and response?
Usually not, but w/o seeing the code I can't say this for sure
- My Redis Database is kept open till my server crashes, it this causes this ?
Should not be a problem.
- Do i need use process mananger like new relic or strongloop to identify this?
It is one way to do it ... but there are also others (see link below).
- So how long this memory will keep on increasing, at some point it must stop (i want to know which point is that?)
Depends on the server setup. How much RAM + what else is running etc.
- I am using sequelize of MSSQL transaction using pooling concept? Does pooling makes this?
Usually not, but as I said before w/o seeing the code it is almost impossible to say this for sure
Maybe this post helps you find the leak:
https://www.nearform./blog/how-to-self-detect-a-memory-leak-in-node/
本文标签: javascriptNodeJS Why pm2 list shows memory keeps on increasingStack Overflow
版权声明:本文标题:javascript - NodeJS: Why pm2 list shows memory keeps on increasing? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741330714a2372749.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论