# How do I reset rails in production mode on DreamHost?

**URL:** <https://www.ruby-forum.com/t/how-do-i-reset-rails-in-production-mode-on-dreamhost/97213>\
**Category:** Rails\
**Created:** [July 5, 2006, 5:44pm UTC](https://www.ruby-forum.com/t/how-do-i-reset-rails-in-production-mode-on-dreamhost/97213 "2006-07-05T17:44:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@ssk](https://www.ruby-forum.com/u/ssk)\
**Post date:** [July 5, 2006, 5:44pm UTC](https://www.ruby-forum.com/t/how-do-i-reset-rails-in-production-mode-on-dreamhost/97213/1 "2006-07-05T17:44:06Z")

</div>

Hello!

I am testing rails on DreamHost.  
I believe it’s running on apache.  
In development mode, it ran very slowly.  
So I changed it into production mode and switched to fcgi.  
It’s very fast now.  
But the problem is that if I add actions to a controller, it’s not  
applied.  
I know that in production mode, I need to restart web server.  
But I don’t control the web server.  
How can I reset rails?

Thanks in advance.

Sam

---

<div class="post-metadata">

**Author:** ![ssk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@ssk](https://www.ruby-forum.com/u/ssk)\
**Post date:** [July 5, 2006, 6:02pm UTC](https://www.ruby-forum.com/t/how-do-i-reset-rails-in-production-mode-on-dreamhost/97213/2 "2006-07-05T18:02:39Z")

</div>

In your shell for Dreamhost, issue this command

killall -USR2 dispatch.fcgi

That usually works for me. If it doesn’t, you’ll need to find all your  
dispatchers

ps -ef | grep dispatch.fcgi

and kill each one by process id

kill -9 (process id)

---

<div class="post-metadata">

**Author:** ![ssk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@ssk](https://www.ruby-forum.com/u/ssk)\
**Post date:** [July 5, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/how-do-i-reset-rails-in-production-mode-on-dreamhost/97213/3 "2006-07-05T18:59:41Z")

</div>

Brian H. wrote:

> In your shell for Dreamhost, issue this command
> 
> killall -USR2 dispatch.fcgi
> 
> That usually works for me. If it doesn’t, you’ll need to find all your  
> dispatchers
> 
> ps -ef | grep dispatch.fcgi
> 
> and kill each one by process id
> 
> kill -9 (process id)

Thanks, Brian.  
The second method works.  
I’m not sure about the first one yet.

Sam

---

<div class="post-metadata">

**Author:** ![ssk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@ssk](https://www.ruby-forum.com/u/ssk)\
**Post date:** [July 5, 2006, 10:55pm UTC](https://www.ruby-forum.com/t/how-do-i-reset-rails-in-production-mode-on-dreamhost/97213/4 "2006-07-05T22:55:32Z")

</div>

Sam K. wrote:

> Brian H. wrote:
> 
> > In your shell for Dreamhost, issue this command
> > 
> > kill -9 (process id)
> 
> Thanks, Brian.  
> The second method works.  
> I’m not sure about the first one yet.
> 
> Sam

You might want to get a copy of my fcgi\_watch script:

[http://www.alevans.com/dl/fcgi\_watch-0.3.1.tgz](http://www.alevans.com/dl/fcgi_watch-0.3.1.tgz)

I wrote it specifically to handle some issues with FCGI processes on  
Dreamhost. It will come in especially handy when you deploy your second  
Rails app:-)

–Al Evans

---

<div class="post-metadata">

**Author:** ![ssk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@ssk](https://www.ruby-forum.com/u/ssk)\
**Post date:** [July 6, 2006, 1:27am UTC](https://www.ruby-forum.com/t/how-do-i-reset-rails-in-production-mode-on-dreamhost/97213/5 "2006-07-06T01:27:23Z")

</div>

Al Evans wrote:

> You might want to get a copy of my fcgi\_watch script:
> 
> [http://www.alevans.com/dl/fcgi\_watch-0.3.1.tgz](http://www.alevans.com/dl/fcgi_watch-0.3.1.tgz)
> 
> I wrote it specifically to handle some issues with FCGI processes on  
> Dreamhost. It will come in especially handy when you deploy your second  
> Rails app:-)
> 
> –Al Evans

Oh, thank you very much.  
I’ll definately check it out.

Thanks again.

Sam

---

<div class="post-metadata">

**Author:** ![ssk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@ssk](https://www.ruby-forum.com/u/ssk)\
**Post date:** [July 6, 2006, 5:43am UTC](https://www.ruby-forum.com/t/how-do-i-reset-rails-in-production-mode-on-dreamhost/97213/6 "2006-07-06T05:43:56Z")

</div>

Al:  
Love that script but I always forget where it is 🙂  
Thanks!
