TomatoYuyuko
V2EX  ›  Node.js

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

  •  
  •   TomatoYuyuko · Jul 4, 2019 · 5784 views
    This topic created in 2711 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
    whypool
    Jul 4, 2019❤️1
    1
    如果用 pm2 的多 cpu 模式启动,按数量启动,就会有多个窗口,node cluster

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

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