gitlab-pages serves errors while starting up
As part of https://gitlab.com/gitlab-com/infrastructure/issues/2035 and https://gitlab.com/gitlab-com/infrastructure/issues/2040 we discovered that gitlab-pages
serves HTTP 404 errors during its startup. I believe this happens because it first brings up the listening socket and then it starts loading the domains.
Normally, when tens of domains are present, this isn't a great deal as the daemon is able to load them fast enough to go unnoticed. At GitLab.com though we have tens of thousands of domains and this process can easily take a few minutes to complete, forcing us to tweet about it.
It would make more sense to me to only bring up the socket after all the domains have been loaded. That is, only start serving the requests after the data to serve is fully available to the daemon.