{"action":"created","issue":{"url":"https://api.github.com/repos/krakenjs/kraken-js/issues/326","labels_url":"https://api.github.com/repos/krakenjs/kraken-js/issues/326/labels{/name}","comments_url":"https://api.github.com/repos/krakenjs/kraken-js/issues/326/comments","events_url":"https://api.github.com/repos/krakenjs/kraken-js/issues/326/events","html_url":"https://github.com/krakenjs/kraken-js/issues/326","id":55442901,"number":326,"title":"\"Server is Starting\" when using Phusion Passenger","user":{"login":"frnco","id":1730340,"avatar_url":"https://avatars.githubusercontent.com/u/1730340?v=3","gravatar_id":"","url":"https://api.github.com/users/frnco","html_url":"https://github.com/frnco","followers_url":"https://api.github.com/users/frnco/followers","following_url":"https://api.github.com/users/frnco/following{/other_user}","gists_url":"https://api.github.com/users/frnco/gists{/gist_id}","starred_url":"https://api.github.com/users/frnco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frnco/subscriptions","organizations_url":"https://api.github.com/users/frnco/orgs","repos_url":"https://api.github.com/users/frnco/repos","events_url":"https://api.github.com/users/frnco/events{/privacy}","received_events_url":"https://api.github.com/users/frnco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-26T03:10:53Z","updated_at":"2015-01-26T03:27:42Z","closed_at":null,"body":"This piece of code breaks flows with Phusion Passenger, since Passenger starts processes when requests are made:\r\n\r\n        parent.use(function startup(req, res, next) {\r\n            if (deferred.promise.isFulfilled()) {\r\n                next();\r\n                return;\r\n            }z\r\n            res.send(503, 'Server is starting.');\r\n        });\r\n\r\n\r\nWouldn't it be better to check on promises and wait until they complete if needed?\r\n\r\nNot the easiest way out, I'm pretty sure, but I think it's better for KrakenJS if it can run amazingly with lots of tools, and Passenger is a pretty good tool for deloyment.\r\n\r\n\r\n\r\nAlso, not directly related and I know off-topic is kinda bad, but I couldn't find much about deploying. I'll possibly create another issue or do a Pull Request on the docs about that (So please let's not fill this thread with deploying stuff), but it won't hurt to ask opinions on the matter, maybe I just need some pointing in the right direction.\r\n\r\n\r\nThanks in advance. :D"},"comment":{"url":"https://api.github.com/repos/krakenjs/kraken-js/issues/comments/71410745","html_url":"https://github.com/krakenjs/kraken-js/issues/326#issuecomment-71410745","issue_url":"https://api.github.com/repos/krakenjs/kraken-js/issues/326","id":71410745,"user":{"login":"totherik","id":412006,"avatar_url":"https://avatars.githubusercontent.com/u/412006?v=3","gravatar_id":"","url":"https://api.github.com/users/totherik","html_url":"https://github.com/totherik","followers_url":"https://api.github.com/users/totherik/followers","following_url":"https://api.github.com/users/totherik/following{/other_user}","gists_url":"https://api.github.com/users/totherik/gists{/gist_id}","starred_url":"https://api.github.com/users/totherik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/totherik/subscriptions","organizations_url":"https://api.github.com/users/totherik/orgs","repos_url":"https://api.github.com/users/totherik/repos","events_url":"https://api.github.com/users/totherik/events{/privacy}","received_events_url":"https://api.github.com/users/totherik/received_events","type":"User","site_admin":false},"created_at":"2015-01-26T03:27:42Z","updated_at":"2015-01-26T03:27:42Z","body":"I'll let @jasisk decide the future direction, but I can say that blocking/holding onto requests was taken into account when designing this. I decided that it was inappropriate to queue an indeterminate number of requests and instead allow infrastructure designed to understand application readiness do their job. \r\n\r\nI also don't want to rabbit hole on deployment concerns, but a running process or bound port do not an application make. The application should dictate when it's able to handle requests and behave accordingly. \r\n\r\nInterested to hear @jasisk thoughts. "}}