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

No of restart of logrotate is too high

Open sas7085 opened this issue 7 years ago • 3 comments

Hi

The no of restart of logrotate is too high. Not sure this is issue with log rorate or this is the way logrotate used to work. Its only 7 days of installation of logrotate module . image

sas7085 avatar Feb 21 '18 18:02 sas7085

Try pm2 logs pm2-logrotate and you will see, what is wrong. Which node version are you using?

HonzaMac avatar Apr 19 '18 09:04 HonzaMac

I have the same thing currently, running 4.x for an older application that hasn't been upgraded yet. The error I'm hitting looks to be use of .includes which wasn't supported until recent node versions.

1|pm2-logr |     at proceed_file (/xxxx/.pm2/node_modules/pm2-logrotate/app.js:159:22)
1|pm2-logr |     at null._repeat (/xxxx/.pm2/node_modules/pm2-logrotate/app.js:212:5)
1|pm2-logr |     at wrapper [as _onTimeout] (timers.js:279:11)
1|pm2-logr |     at Timer.listOnTimeout (timers.js:92:15)

unusualbob avatar Aug 13 '18 20:08 unusualbob

Problem is, that you have newer version of logrotate, that does not support old node 4.x Last working is 2.2.4, downgrade. pm2 install [email protected] <- lock version during installation.

HonzaMac avatar Aug 15 '18 08:08 HonzaMac