Hi!I'm using PM2 to deploy my application. I have made my application emit process.emit("ready") when its ready. I have also made it shut itself gracefully when it gets SIGINT signal from PM2 [process.on('SIGINT', doShutdown);].My expected behaviour was that PM2 will start a new process for my application and emit SIGINT to the existing one. But in reality is doing in inverse order. Not only that it's also waiting for the existing app to quit before it starts a new one. So that gives Downtime.My application isn't a web application. It doesn't need to listen on any port except connect to redis.My command to start PM2 is : pm2 start index.js --kill-timeout 120000 --wait-ready --listen-timeout=10000 -- --config=config/example.jsonTo deploy I am using : pm2 reload allHow do I make it start the new process before killing the existing one? Can this be achieved by any other tool than PM2? please suggest?
Submitted September 18, 2018 at 11:09PM by longloop
No comments:
Post a Comment