# What to do when capistrano/mongrel go off the rails

**URL:** <https://www.ruby-forum.com/t/what-to-do-when-capistrano-mongrel-go-off-the-rails/111016>\
**Category:** Rails\
**Created:** [August 1, 2007, 11:31pm UTC](https://www.ruby-forum.com/t/what-to-do-when-capistrano-mongrel-go-off-the-rails/111016 "2007-08-01T23:31:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blinking\_bear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Post date:** [August 1, 2007, 11:31pm UTC](https://www.ruby-forum.com/t/what-to-do-when-capistrano-mongrel-go-off-the-rails/111016/1 "2007-08-01T23:31:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![blinking\_bear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Post date:** [August 2, 2007, 5:06pm UTC](https://www.ruby-forum.com/t/what-to-do-when-capistrano-mongrel-go-off-the-rails/111016/2 "2007-08-02T17:06:24Z")

</div>

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. 🙂
