pm2-logrotate
pm2-logrotate copied to clipboard
No of restart of logrotate is too high
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 .
Try pm2 logs pm2-logrotate
and you will see, what is wrong.
Which node version are you using?
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)
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.