Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue #3391

Closed
KirillSuhodolov opened this issue Nov 26, 2015 · 3 comments
Closed

Performance issue #3391

KirillSuhodolov opened this issue Nov 26, 2015 · 3 comments

Comments

@KirillSuhodolov
Copy link

Hello, guys. Sorry if this issue can be inappropriate.
I am using sails.js and very happy with it, but recently, when deploying app I have issues with it.
After staring project via forever or just via node app.js I see many running instances of application. After each request they increase used RAM.

1 cores
2 cores

sails 0.11, nodejs 0.12, digitalocean

How can I find where memory leak at sails and second questions: how control number of running sails instances?

@wulfsolter
Copy link
Contributor

Specify child instances in PM2 with fork/cluster mode and instance count to reduce the number of running app.js'. Maybe check out pm2-dev, made for developing.

http://pm2.keymetrics.io/docs/usage/cluster-mode/
http://pm2.keymetrics.io/docs/usage/application-declaration/

As for a "memory leak", I run a few pretty large Sails instances and know of no leaks on current stable release. Sometimes Node's GC takes a while to run, but if you have a leak it's not due to Sails. See https://github.com/balderdashy/waterline/issues/1180 and
https://github.com/soyuka/nodejs-http-memtest

@KirillSuhodolov
Copy link
Author

@wulfsolter thanks for response, will dig deeper.

@mikermcneil
Copy link
Member

For future reference, there's more information and tips on diagnosing memory leaks in Node apps, and on reproducing+reporting suspected memory leaks in Sails here:
#3782 (comment)

@balderdashy balderdashy locked and limited conversation to collaborators Aug 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants