[Mongrel] cluster::restart vs. stop/start

Zed Shaw zedshaw at zedshaw.com
Tue Jun 20 21:03:54 EDT 2006

On Tue, 2006-06-20 at 12:04 -0400, Jason Young wrote:
> What's the difference, architecturally between cluster::restart and  
> cluster::stop/start (I haven't looked at the code, which is kinda  
> lazy of me to ask the question I know)
> If they aren't very different actually, can I put a plug in for  
> having cluster::restart do a "start" if something's happened and  
> mongrel is stopped for that configuration?   It appears  
> that ::restart doesn't start a stopped configuration, and logically  
> to me, (or at least consistently with most process restart commands)  
> it should.

I'll shoot this suggestion to Bradley and see what he thinks.  For
mongrel a restart is actually re-runs mongrel from a inside the same
ruby interpreter, forks and then exits.  This gives you a fast restart
and makes sure all the current requests are done.

In the case of mongrel_cluster this might get complicated.  It might
involve checking for PIDs and compare with what's running, or maybe
checking ports.  Ruby doesn't have good facilities for listing PIDs so
it might take some shell hackery. :-)

Zed A. Shaw

More information about the Mongrel-users mailing list