[英]PM2 not making clusters
I just installed pm2, I already has done clustering in my app.js using node cluster module. 我刚刚安装了pm2,我已经使用节点集群模块在app.js中完成了集群。
When I use pm2 start app.js -i 4 to start my app.js it only show me one online instance. 当我使用pm2 start app.js -i 4启动我的app.js时,它只显示一个在线实例。 It should show me 4 instance Please tell me what is the problem
它应该显示4个实例,请告诉我是什么问题
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. i
是您要启动的instance
数。
Always use pm2 delete all
to unregister the CPU
, since if you stop it, it still reserve the CPU
始终使用
pm2 delete all
取消注册CPU
,因为如果停止它,它仍会保留CPU
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.