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

PM2 God consuming memory more than app #4064

Closed
krittylor opened this issue Dec 9, 2018 · 3 comments
Closed

PM2 God consuming memory more than app #4064

krittylor opened this issue Dec 9, 2018 · 3 comments

Comments

@krittylor
Copy link

What's going wrong?

I'm running web server with PM2, which is advised for production.
But after 24 hours of running, PM2 God daemon is using about 1GB of memory.

That causes pm2 apps down when we have any other processes running.

PM2 God daemon starts at 48MB then grows up to 1GB...

How could we reproduce this issue?

It normally goes down after 24 or 48 hours of running.

Supporting information

Server's memory size: 2GB
App memory usage: 800MB
PM2 memory usage: 1GB

$ pm2 report
@holau01
Copy link

holau01 commented Dec 19, 2018

i have experienced the same issue. Found that xxx-out.log files had grown too large to more than 2GB and pm2 didn’t write anything into them anymore. Moreover, I found xxx-error.log files stated some files were too large. I then redirected all console outputs to /dev/null by using the “-o” parameter. It seems that this workaround can avoid the problem. Would like to know whether you are facing the same situation.

@Unitech
Copy link
Owner

Unitech commented Dec 19, 2018

@prosunshining telling that kind of things, without providing any information (pm2 report is an helper I built to make reporting easier, to avoid you having to type 10 commands. this is not for dogs ok?), anything to reproduce, without screenshot anything, is a waste of time for everyone. I've ran an app that is flooding log as hell and nothing leaks.
So if you want me to help you provide more information

@Unitech Unitech closed this as completed Dec 19, 2018
@krittylor
Copy link
Author

@holau01 Your comment was helpful, I could find out that log file which has been full up to 2GB and got memory stuck. It worked well when disabled pm2 logging and streamed logs into local file.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants