#PM2 Configuration File for Sharded bot
7 messages · Page 1 of 1 (latest)
Don’t reply to months old support posts, even less so with off-topic
I actually have a similar problem that occurs on a bot crash where I get stagnant leftover shard processes.
Any ideas?
How can I create an auto restart config in PM2 for Sharded bot?
Will this work?
module.exports = {
apps: [
{
name: 'bot',
script: './index.js',
args: '--color',
node_args: '--max_old_space_size=12000',
max_memory_restart: '10G',
},
],
};
The problem is when the main process crashes for some reason, The shards keeps running independently.
Why would they? Child processes should stop once their parent is gone, shouldn’t they?
