Open
Description
I have cluster running 3 instances of a process using the following ecosystem file:
module.exports = {
apps: [{
name: 'api.my_product.com',
script: './dist/src/index.js',
instances: 3,
exec_mode: 'cluster',
autorestart: true,
watch: false,
max_memory_restart: '2G',
env: {
NODE_ENV: 'production',
},
}],
};
Which writes logs to the default location ~/.pm2/logs
.
I've installed pm2-logrotate
with the default settings, however it only rotates the logs for the first process in the cluster. The other two processes continue writing to the same files. How do I configure it to rotate log files for all the processes?
Metadata
Metadata
Assignees
Labels
No labels