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

Error in cluster mode

Open SergijeRaz opened this issue 5 years ago • 1 comments

Hi, I have multiple apps running in cluster mode on my server via pm2, and each morning i get the error: { Error: ENOENT: no such file or directory, unlink 'xxx/meteor/logs/log__2019-07-20_00-00-00.log' errno: -2, code: 'ENOENT', syscall: 'unlink', path: 'xxx/meteor/logs/log__2019-07-20_00-00-00.log' } (number of instances - 1) times for each app. My guess is that pm2-logrotate tries to delete the log file once for each instance of the app. The first one deletes the log, and then other instances get the error because the file is already deleted.

SergijeRaz avatar Aug 19 '19 08:08 SergijeRaz

the same for me

textarea avatar Jun 01 '23 09:06 textarea