<Mongrel noob>: Verifying start/stop order of processes

Is it best practice/correct to:

Start Mongrel, then Apache

and conversely,

Stop Apache, then Mongrel

on server startup and shutdown?

Thanks,
Wes

On Mar 7, 4:14 pm, Wes G. [email protected]
wrote:

Thanks,
Wes

I don’t see how it would matter, but I tend to start Apache first,
then my mongrels. In the startup scenario, Apache will return a “bad
gateway (503, I think)” if your mongrel is not yet started. However,
the time it takes to start Apache and a pack of mongrels is pretty
short, so you probably won’t have any problems. If your mongrels are
started first, they will listen until they get pinged on their port.
Starting Apache second ensures that the first request served can be
proxied to a mongrel.

The takedown scenario just can’t matter. Again, if you shut off the
mongrels first and a request comes in, Apache will return a bad
gateway, but presumably, Apache will be gone too in a short bit, and
there will be no trace of a server on port 80, right? So if you really
don’t want to serve up those bad gateway pages, then take Apache down
first, then the mongrels.

On 8 Mar 2008, at 00:27, s.ross wrote:

started first, they will listen until they get pinged on their port.
Starting Apache second ensures that the first request served can be
proxied to a mongrel.

I start mongrels, then apache. Depending on how your apache is setup,
if people try to access your site then apache will try to talk to the
mongrels and fail, and by default apache has some sort of cool off
period where even when you have brought the mongrels back up it will
still show those 503s for that cooloff period.

Fred