-e --error :错误输出日志文件的路径。 --interpreter :the interpreter pm2 should use for executing app (bash,python…)。比如你用的coffee script来编写应用。 参考官网文档 2. 安装 1) 全局安装 管理员cmd窗口运行: npm install pm2 -g 2) 安装windows自启动包 npm install pm2-windows-startup -g 3...
Error: EBADF: bad file descriptor, uv_pipe_open at Object.exports._forkChild (child_process.js:110:5) at Object.setupChannel (internal/process.js:247:8) at startup (bootstrap_node.js:63:16) at bootstrap_node.js:608:3 解决方案: windows下用pm2启动node的时候,用cluster_mode启动,就可以成...
自动重启:为了确保应用程序的高可用性,可以配置pm2自动重启进程。可以使用pm2 startup命令生成一个启动脚本,并将其注册为系统服务,以便在服务器重启时自动启动pm2进程。 优化应用程序:如果pm2进程频繁崩溃,可能是应用程序本身存在问题。可以通过优化代码、增加错误处理机制、减少内存占用等方式来提高应用程序的稳定...
先pm2 start 运行你要开机启动的程序, 再pm2 save,看看 /.pm2/dump.pm2 这个文件检查是否真的保存住了保存住了就可以 pm2 startup 如果Windows对pm2 支持不够友好,那可以用Windows自带的启动 ,比如把启动这个程序的命令放进bat脚本。在cmd中输入“gpedit.msc”,打开“组策略”窗口。 依次“计算机配置→Windows设...
先pm2 start 运行你要开机启动的程序, 再pm2 save,看看 /.pm2/dump.pm2 这个文件检查是否真的保存住了保存住了就可以 pm2 startup 如果Windows对pm2 支持不够友好,那可以用Windows自带的启动 ,比如把启动这个程序的命令放进bat脚本。在cmd中输入“gpedit.msc”,打开“组策略”窗口。 依次...
然后json目录直接运行pm2 start pm2.json 开机自动启动 1、通过pm2 save保存当前进程状态。 2、通过pm2 startup [platform]生成开机自启动的命令。例如:pm2 startup centeros 3、将步骤2生成的命令,粘贴到控制台进行,搞定。
{NODE_ENV:'production'//使用production模式 pm2 start ecosystem.config.js --env production},instances:"max",//将应用程序分布在所有CPU核心上,可以是整数或负数watch:true,//监听模式output:'./out.log',//指定日志标准输出文件及位置error:'./error.log',//错误输出日志文件及位置,pm2 install pm2-...
Hi, When I run "pm2 startup" on Windows, it gave me an error that "Init system not found". How can I handle this ? Thanks! OS: Windows 10 64 bit. pm2 Version : 2.8 Contributor pm2 startuponly support unix systems seehttp://pm2.keymetrics.io/docs/usage/startup/#windows-consideratio...
-e --error <path>:错误输出日志文件的路径。 --interpreter <interpreter>:the interpreter pm2 should use for executing app (bash, python...)。比如你用的coffee script来编写应用。 pm2支持直接运行Node.js启动项目,如下: pm2 start server/index.js ...
$ pm2 start process.ymlRead more about application declaration here.Setup startup scriptRestarting PM2 with the processes you manage on server boot/reboot is critical. To solve this, just run this command to generate an active startup script:$ pm2 startup...