TomatoYuyuko
V2EX  ›  Node.js

用 pm2 跑项目为啥会弹出 4 个 node 窗口

  •  
  •   TomatoYuyuko · Jul 4, 2019 · 5645 views
    This topic created in 2582 days ago, the information mentioned may be changed or developed.

    跑的 bin/www,跑 app.js 会无限重启 现在的状况是项目启动没问题了,但是会弹出 4 个 node 的命令符窗口,这意味啥 是姿势不对吗

    btw v2 现在发图片要用什么图床,新浪好像炸了?

    4 replies    2019-07-04 16:44:07 +08:00
    whypool
        1
    whypool  
       Jul 4, 2019   ❤️ 1
    如果用 pm2 的多 cpu 模式启动,按数量启动,就会有多个窗口,node cluster

    如果程序使用 node cluster 模式,win 下也会弹多个

    linux 屁事没有
    piloots
        2
    piloots  
       Jul 4, 2019
    一楼是正确的,另外 win 系列跑 nodejs 确实很操蛋,建议换系统 hhh...
    imherer
        3
    imherer  
       Jul 4, 2019
    windows 下启动的吧? 确实是有这个问题
    iyu90
        4
    iyu90  
       Jul 4, 2019 via iPhone
    升级最新版 pm2,之前遇到过,然后有个版本 release notes 说解决了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3912 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 80ms · UTC 00:50 · PVG 08:50 · LAX 17:50 · JFK 20:50
    ♥ Do have faith in what you're doing.