Skip to content

pm2 logging takes free space on AWS EC2 instance #2997

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

Closed
irenashemesh opened this issue Jul 3, 2017 · 5 comments
Closed

pm2 logging takes free space on AWS EC2 instance #2997

irenashemesh opened this issue Jul 3, 2017 · 5 comments

Comments

@irenashemesh
Copy link

Tried to modify pm2 logging according to http://pm2.keymetrics.io/docs/usage/log-management/:

by running the app with the following scripts in package.json:

"start": "node ./node_modules/.bin/pm2 start index.js",
"poststart": "node ./node_modules/.bin/pm2 logs --output "/dev/null" --error "/dev/null"",

This did not help much - after a day 1.5GB of logging.

There is a section in this document named "JSON way", however it is not clear where (which file) this JSON should be used.

We need to disable logs, not manage via logrotate.

PM2 version: `PM2 2.5.0`
Node version: `6.10.0`
Linux
@vmarchaud
Copy link
Contributor

Is the problem applications logs or PM2 logs ? Because it should not output any log with your current configuration.
The "JSON way" is just using what we call a process file, it's just a json file where you put your application configuration

@Unitech
Copy link
Owner

Unitech commented Jul 4, 2017

Have you tried to disable the logs: http://pm2.keymetrics.io/docs/usage/application-declaration/#disabling-logs

Unitech added a commit that referenced this issue Jul 4, 2017
@Unitech
Copy link
Owner

Unitech commented Jul 4, 2017

You can try the --disable-logs option:

$ npm install Unitech/pm2#development -g
$ pm2 update
$ pm2 start app.js --disable-logs

Unitech added a commit that referenced this issue Jul 5, 2017
Unitech added a commit that referenced this issue Jul 5, 2017
Unitech added a commit that referenced this issue Jul 5, 2017
@Unitech
Copy link
Owner

Unitech commented Jul 20, 2017

Published on PM2 2.6.0:

$ npm install pm2@latest -g
$ pm2 update
$ pm2 start xxx.js --disable-logs

@Unitech Unitech closed this as completed Jul 20, 2017
@irenashemesh
Copy link
Author

irenashemesh commented Jul 20, 2017 via email

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