Optimize Node.js memory consumption

后端 未结 2 941
小鲜肉
小鲜肉 2021-02-02 01:38

I\'m writing a simple cms in Node.js, Express and MongoDB. I\'m planning to run a different Node.js process for every site. The problem is that after startup the process takes a

相关标签:
2条回答
  • 2021-02-02 01:52

    Here is a quick fix, a node.js lib that will restart the any node process once it reaches a certain size. https://github.com/DoryZi/memory_limiter

    0 讨论(0)
  • 2021-02-02 02:14

    The links below may help you to understand and detect memory leaks (if they do exist):

    Debugging memory leaks in node.js

    Detecting Memory Leaks in Node.js Applications

    Tracking Down Memory Leaks in Node.js

    These SO questions may also be useful:

    How to monitor the memory usage of Node.js?

    Node.js Memory Leak Hunting

    0 讨论(0)
提交回复
热议问题