{"action":"created","issue":{"url":"https://api.github.com/repos/Unitech/pm2/issues/1875","labels_url":"https://api.github.com/repos/Unitech/pm2/issues/1875/labels{/name}","comments_url":"https://api.github.com/repos/Unitech/pm2/issues/1875/comments","events_url":"https://api.github.com/repos/Unitech/pm2/issues/1875/events","html_url":"https://github.com/Unitech/pm2/issues/1875","id":124954243,"number":1875,"title":"Cluster Mode : Shouldn't PM2 wait for listening event on current worker before reloading the next one?","user":{"login":"wilsonmarkj067","id":15795265,"avatar_url":"https://avatars.githubusercontent.com/u/15795265?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonmarkj067","html_url":"https://github.com/wilsonmarkj067","followers_url":"https://api.github.com/users/wilsonmarkj067/followers","following_url":"https://api.github.com/users/wilsonmarkj067/following{/other_user}","gists_url":"https://api.github.com/users/wilsonmarkj067/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonmarkj067/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonmarkj067/subscriptions","organizations_url":"https://api.github.com/users/wilsonmarkj067/orgs","repos_url":"https://api.github.com/users/wilsonmarkj067/repos","events_url":"https://api.github.com/users/wilsonmarkj067/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonmarkj067/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-05T12:03:17Z","updated_at":"2016-01-05T13:41:42Z","closed_at":null,"body":"I am running an Express app on Ubuntu 14.04, Single Core machine (Azure VM). \r\n\r\nI started my app in cluster mode and spawned 2 workers. When I reload using `pm2 reload app`, PM2 successfully reloads the workers, but it takes 5-10 seconds for my workers to start accepting connections (listening event). So, during that time I am seeing a downtime.\r\n\r\nWhen reloading workers in cluster, shouldn't PM2 wait for `listening` event on current worker before reloading the next one? In my case I do `pm2 reload app` and then run `pm2 logs` to stream logs realtime. Although pm2 reloads workers, I can actually see `listening` event logs after 5-10 seconds. \r\n\r\nAny help here will be highly appreciated. How do you do zero downtime deployment?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/Unitech/pm2/issues/comments/169001552","html_url":"https://github.com/Unitech/pm2/issues/1875#issuecomment-169001552","issue_url":"https://api.github.com/repos/Unitech/pm2/issues/1875","id":169001552,"user":{"login":"adrian-ludwig","id":1642500,"avatar_url":"https://avatars.githubusercontent.com/u/1642500?v=3","gravatar_id":"","url":"https://api.github.com/users/adrian-ludwig","html_url":"https://github.com/adrian-ludwig","followers_url":"https://api.github.com/users/adrian-ludwig/followers","following_url":"https://api.github.com/users/adrian-ludwig/following{/other_user}","gists_url":"https://api.github.com/users/adrian-ludwig/gists{/gist_id}","starred_url":"https://api.github.com/users/adrian-ludwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrian-ludwig/subscriptions","organizations_url":"https://api.github.com/users/adrian-ludwig/orgs","repos_url":"https://api.github.com/users/adrian-ludwig/repos","events_url":"https://api.github.com/users/adrian-ludwig/events{/privacy}","received_events_url":"https://api.github.com/users/adrian-ludwig/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T13:41:42Z","updated_at":"2016-01-05T13:41:42Z","body":"use gracefulReload ?"}}