logo       

[ANN] mongrel_cluster 0.2.2 prerelease: msg#00191

lang.ruby.mongrel.general

Subject: [ANN] mongrel_cluster 0.2.2 prerelease

Hey y'all:

I've added some new stuff to mongrel_cluster. Give it try and let me
know if it works for you.

* Added '--clean' to cluster::start to force removal of the pidfile
before trying to start the cluster member. This is useful for recovering
from unexpected process death.

* Added '--only PORT' to cluster::* to support running a command on a
single cluster member identified by its port number (eg, 8001). Inspired
by Kaspar Schiess.

* Added cluster::status to display basic process status information for
the cluster. Returns '0' if all processes are found and '2' if a process
or pidfile is missing. Supports '--only'. Status commands were also
added to the init.d script, mongrel_cluster_ctl, and the cap recipes.

* The init.d script (resources/mongrel_cluster) will now create
/var/run/mongrel_cluster and chown to a defined user on start. To fully
use this feature, update your cluster yml files to store the pidfile in
/var/run/mongrel_cluster. This will support cleaning up orphaned
pidfiles at boot time. For example:
pid_file: /var/run/mongrel_cluster/foo.pid

* Fixed a parameter bug with mongrel_cluster_ctl calling mongrel_rails.

How would you use some of these new features? Lets pretend that your
blog gets spammed by 3000+ comments and 2000+ trackbacks pushing your
process memory usage to 300mb+. The fair and just Linux kernel,
displeased by your actions, smites one of your processes using the all
powerful oom-killer. How do you recover?

$ mongrel_rails cluster::status
Checking 2 Mongrel servers...
Found dog: 8000
Lost dog: 8001

$ mongrel_rails cluster::start --only 8001 --clean
Cleaning 1 pid file...
Starting 1 Mongrel server...

$ mongrel_rails cluster::status
Checking 2 Mongrel servers...
Found dog: 8000
Found dog: 8001

I'm open to suggestions for some different 'status' output. Let me know
if I broke anything.

Install with:
sudo gem install mongrel_cluster --source
http://mongrel.rubyforge.org/releases/

Thanks,
Bradley Taylor
Rails Machine
http://railsmachine.com



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise