pm2-logrotate icon indicating copy to clipboard operation
pm2-logrotate copied to clipboard

Max size not being used

Open FayKn opened this issue 2 years ago • 4 comments

I have the following config

$ pm2 set pm2-logrotate:max_size 10K
$ pm2 set pm2-logrotate:retain 7
$ pm2 set pm2-logrotate:compress false
$ pm2 set pm2-logrotate:dateFormat YYYY-MM-DD_HH-mm-ss
$ pm2 set pm2-logrotate:workerInterval 30
$ pm2 set pm2-logrotate:rotateInterval */0 0 12 10 *
$ pm2 set pm2-logrotate:rotateModule true

And so you'd expect files that are larger then 10kb to not happen but then I find files that are 40kb, could I be doing something wrong?

the file in question is named index-error__2022-04-01_11-31-16.log

server is running AlmaLinux- 8 and it's hosting a Nuxt.js app

Thanks!

FayKn avatar Apr 01 '22 09:04 FayKn

@vmarchaud @jshkurti
I have the same problem.I'm very much looking forward to a reply.

➜  node-bff git:(master) ✗ ./node_modules/.bin/pm2 set pm2-logrotate:max_size 1K  
➜  node-bff git:(master) ✗ ./node_modules/.bin/pm2 conf    
Module: pm2-logrotate
$ pm2 set pm2-logrotate:max_size 10M
$ pm2 set pm2-logrotate:retain 30
$ pm2 set pm2-logrotate:compress false
$ pm2 set pm2-logrotate:dateFormat YYYY-MM-DD_HH-mm-ss
$ pm2 set pm2-logrotate:workerInterval 30
$ pm2 set pm2-logrotate:rotateInterval 0 0 * * *
$ pm2 set pm2-logrotate:rotateModule true
Module: module-db-v2
$ pm2 set module-db-v2:pm2-logrotate [object Object]
➜  node-bff git:(master) ✗ 

victorykong avatar Apr 02 '22 01:04 victorykong

Same issue!

ducdev avatar May 11 '22 14:05 ducdev

Same issue. It eats up my hard drive.

trmaphi avatar May 22 '22 08:05 trmaphi

has there been any correction since?

m-cisse-easy-live avatar Mar 27 '23 15:03 m-cisse-easy-live