Hi Michael, Thanks for the feedback. Comments below.
> > 1. Parse the mongrel_cluster.yml file through ERB, like Rails does for > the fixtures and database.yml file. Would allow for things like > setting > the CWD to ENV['HOME'], etc. Rails uses: > I'm not sure I understand your motivation. What problem are you trying to solve? The cluster::configure command allows you to specify the working directory with the "-c" option. For example: mongrel_rails cluster::configure -c $HOME/animal_shelter > > 2. Provide a cluster command for starting up "missing" Mongrel > servers. > The issue is that "restart" only restarts processes that are actually > running. And just running "start" will do _bad_ things if you just run > it; it appears to put a new pid into the .pid file, but then fail to > start up (since a process is running already on that port) -- the net > effect is that the process is now orphaned, since you don't know > the pid > anymore. I think you've stumbled on to a few interesting issues: 1. mongrel_rails overwrites the PID file before verifying that the port is available. I'm working on a patch and will send it to Zed and see what he thinks. 2. In addition, should cluster::start validate the availability of ports before calling mongrel_rails start? It probably should ensure the "integrity" of the cluster and fail to start if all ports aren't available. 3. Should cluster::restart have a "lost dog" option that starts missing members of the pack? This might be handy, but I need to think about its real world usage in the context of processing monitoring. With Monit, I use stop/start instead of restart. I suppose if you didn't have monitoring or if it only alerted you, cluster::restart would be the fastest way to get the cluster back in shape. I'll see if I can work this stuff into the next release. > I guess I'm looking for something like the fcgi spinner, that can > start > up Mongrel processes if they die. And allow restarts to turn into a > plain old start, if the target process isn't found. > The Rails script/process/spawner (spinner in 1.0) strategy is a pretty heavy-handed approach to the problem. It is not an appropriate solution for resource limited deployments like a small VPS. Proper process monitoring packages such as Monit and Supervise are the way to go, because they provide notification and detection of an array of potential problems (not just process death) with less overhead. Support for Monit and init.d scripts for mongrel_cluster will be available in the upcoming release of the Rails Machine deployment Gem. Thanks, Bradley ------ Rails Machine Simplified Ruby on Rails application deployment http://railsmachine.com _______________________________________________ Mongrel-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/mongrel-users
