Forum: Ruby on Rails What to do when capistrano/mongrel go off the rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
blinking bear (Guest)
on 2007-08-02 01:31
(Received via mailing list)
What do do when capistrano/mongrel go off the rails:

So capistrano is awesome right?  Right.  Mongrel? yeah thats awesome
too.
Things are great until it's a peak hour of traffic and you want to cap
deploy a 'quick fix'.  Reload the site, 503. WTF!?  Capistrano is
spitting
out all sorts of .pid!!'s at you, the client is calling, you're
frantically
hitting reload (maybe even opening it up in safari just on a whim).
This
isn't a fun position to be in, but you need to know what to do to get
things
on track.  Rather than mess around with cap stop_app/start_app I usually
ssh
into the box:


Check if any mongrels are running:

ps -ax | grep mongrel

if you see any, kill -9 them.

Go to your log directory:

ls | grep mongrel

any mongrel.xxxx.pid files in there?  If so, rm each of them.

You should be set to start the app now:

sudo mongrel_rails cluster::start -C /path/to/your/mongrel_cluster.yml

reload...phewww
hatless (Guest)
on 2007-08-02 19:06
(Received via mailing list)
Or, until mongrel gets more obedient in the stopping department, you
could take the set of steps you just outlined and make them part of
your cap task. :)
This topic is locked and can not be replied to.