-
Notifications
You must be signed in to change notification settings - Fork 138
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
Logrotate filled up all disk space (60Gb) in a single day #169
Comments
This is not issue. pm2 set pm2-logrotate:retain 50It will keep only 50 logfiles, If the 51st file will try to perform the logrtate then it will delete the olf log file. pm2 set pm2-logrotate:size 300MOnce the log file reached the size of 300M then the pm2-logrotate will work You can avoid disk full issue by using these two configurations |
Thank you very much for the answer, but isn't the config i shared saying 10Mb per log file and retain 30 max already? "max_size": "10M", How this ended filling out the entire disk in one day? |
i had a similar issue. New files created every 30 seconds of increasing size:
|
I have a similar issue (#174) with a configuration It looks like |
I had the same issue; crashed my system after logs exploding and taking up 100% of disk space. |
Hello,
Few days ago, my webapp stopped work, i checked on the server and it was stopped in pm2 and didn't want restart.
I figured that the disk was full (25Gb) so i took an upgrade to 80Gb and installed logrotate but today, 2 days after, the disk is full again.
I did a flush logs command, which did bring it from 80Gb to 61Gb.
Then i figured that the .pm2/logs folder was 57Gb and i see 150 log files like "sign-out__2021-02-13_05-36-03.log" for the app for a single day, how can i fix that?
Here my logrotate default config:
"pm2-logrotate": {
"max_size": "10M",
"retain": "30",
"compress": false,
"dateFormat": "YYYY-MM-DD_HH-mm-ss",
"workerInterval": "30",
"rotateInterval": "0 0 * * *",
"rotateModule": true
},
"module-db-v2": {
"pm2-logrotate": {}
}
}
If i understand it well it shouldn keep more than 30 of 10Mb max so 57Gb is not normal.
Deleted all sign-out__2021-02-13_05-36-*.log files and down to 8Gb
I stopped logrotate for now and its ok but would like to know how to solve this issue
Thank you in advance
The text was updated successfully, but these errors were encountered: