最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - pm2 starts two duplicate processes with a different version - Stack Overflow

programmeradmin0浏览0评论

I am using pm2 version 4.2.3

When I run this mand: pm2 start node launchers/engine_launcher.js --name "engine", it starts the following:

id  │ name                           │ namespace   │ version │ mode    │ pid
------------------------------------------------------------------------------
12  │ engine                         │ default     │ 0.34.0  │ fork    │ 893
13  │ engine                         │ default     │ 1.0.0   │ fork    │ 8946

I want only one process to be started. If I pm2 delete engine, both go away.

launchers/engine_launcher.js is a regular javascript script.

What causes this problem? How can I start only one version of my script?

This doesn't happen for other scripts, only this one.

I am using pm2 version 4.2.3

When I run this mand: pm2 start node launchers/engine_launcher.js --name "engine", it starts the following:

id  │ name                           │ namespace   │ version │ mode    │ pid
------------------------------------------------------------------------------
12  │ engine                         │ default     │ 0.34.0  │ fork    │ 893
13  │ engine                         │ default     │ 1.0.0   │ fork    │ 8946

I want only one process to be started. If I pm2 delete engine, both go away.

launchers/engine_launcher.js is a regular javascript script.

What causes this problem? How can I start only one version of my script?

This doesn't happen for other scripts, only this one.

Share Improve this question asked Mar 22, 2020 at 14:25 Benjamin CrouzierBenjamin Crouzier 42k48 gold badges177 silver badges239 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 9

Instead of start node app.js use just start app.js.

pm2 delete 12 is one way to do it.

发布评论

评论列表(0)

  1. 暂无评论