Noman Maqsood
Noman Maqsood

Reputation: 66

PM2 not making clusters

I just installed pm2, I already has done clustering in my app.js using node cluster module.

When I use pm2 start app.js -i 4 to start my app.js it only show me one online instance. It should show me 4 instance Please tell me what is the problem

Screenshot attached

Upvotes: 2

Views: 1289

Answers (1)

abdulbari
abdulbari

Reputation: 6232

Run this command...

it should work.

pm2 stop all

pm2 delete all

pm2 start app.js -i 2

where i is the number of instance you want to start.

Always use pm2 delete all to unregister the CPU, since if you stop it, it still reserve the CPU

Upvotes: 4

Related Questions