Is it best practice/correct to: Start Mongrel, then Apache and conversely, Stop Apache, then Mongrel on server startup and shutdown? Thanks, Wes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 7, 4:14 pm, Wes Gamble <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Is it best practice/correct to: > > Start Mongrel, then Apache > > and conversely, > > Stop Apache, then Mongrel > > on server startup and shutdown? > > Thanks, > WesI 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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Mar-08 12:48 UTC
Re: <Mongrel noob>: Verifying start/stop order of processes
On 8 Mar 2008, at 00:27, s.ross wrote:> > On Mar 7, 4:14 pm, Wes Gamble <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: >> Is it best practice/correct to: >> >> Start Mongrel, then Apache >> >> and conversely, >> >> Stop Apache, then Mongrel >> >> on server startup and shutdown? >> >> 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.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> > > 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. > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---