Quick noob question: how do I restart mongrel?
- Freeform
- Posts: 33
- Starts: 5
- Wiki Edits: 0
- Location: Chicago
I've been making some edits to the layout rhtml files (adding google analytics tracking code), but the changes aren't showing up right away. I assume that a restart of mongrel is on order? If so, how do I do that?
- Vinayan
- Posts: 244
- Starts: 0
- Wiki Edits: 2
Hi Freeform,
You can restart the mongrel instance of your application by executing the command from your rails app folder.
$ mongrel_rails restart
If you are using mongrel cluster then you can use the command
$ mongrel_rails cluster::restart
You can restart the mongrel instance of your application by executing the command from your rails app folder.
$ mongrel_rails restart
If you are using mongrel cluster then you can use the command
$ mongrel_rails cluster::restart
2008-05-24 04:46 PM
- Freeform
- Posts: 33
- Starts: 5
- Wiki Edits: 0
- Location: Chicago
when I run mongrel_rails restart I get the following:
!!! PID file log/mongrel.pid does not exist. Not running?
mongrel::restart reported an error. Use mongrel_rails mongrel::restart -h to get help.
!!! PID file log/mongrel.pid does not exist. Not running?
mongrel::restart reported an error. Use mongrel_rails mongrel::restart -h to get help.
2008-05-24 05:39 PM
- Vinayan
- Posts: 244
- Starts: 0
- Wiki Edits: 2
Hi Freeform,
Please execute the command from your home directory and verify the status of mongrel set up for your application.
$ ps
If mongrel is not running then please start the mongrel instance using the command from your rails app folder.
$ mongrel_rails start -e production -p <port> -d
The following wiki link will guide you to understand more about
setting up of a mongrel instance for rails application.
http://www.hostingrails.com/forums/wiki_thread/19.
Please execute the command from your home directory and verify the status of mongrel set up for your application.
$ ps
If mongrel is not running then please start the mongrel instance using the command from your rails app folder.
$ mongrel_rails start -e production -p <port> -d
The following wiki link will guide you to understand more about
setting up of a mongrel instance for rails application.
http://www.hostingrails.com/forums/wiki_thread/19.
2008-05-24 06:44 PM
- Freeform
- Posts: 33
- Starts: 5
- Wiki Edits: 0
- Location: Chicago
Mongrel seems to be running. ps returns the following:
/usr/local/bin/ruby /usr/local/bin/mongrel_rails start -e production -p 4543 -d
/usr/local/bin/ruby /usr/local/bin/mongrel_rails start -e production -p 4543 -d
2008-05-24 11:53 PM
- Freeform
- Posts: 33
- Starts: 5
- Wiki Edits: 0
- Location: Chicago
So, any idea why mongrels can't be restarted even though its running fine?
2008-05-26 07:50 AM
- Kumar
- Posts: 447
- Starts: 0
- Wiki Edits: 5
Hi - Sure you can restart the running mongrel using the command
/usr/local/bin/mongrel_rails restart
from the rails root directory.
/usr/local/bin/mongrel_rails restart
from the rails root directory.
2008-05-26 07:54 AM
HostingRails Support- Freeform
- Posts: 33
- Starts: 5
- Wiki Edits: 0
- Location: Chicago
By rails root directory, which directory do you mean?
2008-05-26 11:52 AM
- Kumar
- Posts: 447
- Starts: 0
- Wiki Edits: 5
Hi - Your ruby application directory . Thank you
2008-05-26 11:57 AM
HostingRails Support- Freeform
- Posts: 33
- Starts: 5
- Wiki Edits: 0
- Location: Chicago
Nope, it still isn't working by running it in my ruby app's directory:
!!! PID file log/mongrel.pid does not exist. Not running?
mongrel::restart reported an error. Use mongrel_rails mongrel::restart -h to get help.
I run ps and get the following:
freefor 21722 0.0 0.9 45648 39484 ? S May08 0:07 /usr/local/bin/ruby /usr/local/bin/mongrel_rails start -e production -p 4543 -d
!!! PID file log/mongrel.pid does not exist. Not running?
mongrel::restart reported an error. Use mongrel_rails mongrel::restart -h to get help.
I run ps and get the following:
freefor 21722 0.0 0.9 45648 39484 ? S May08 0:07 /usr/local/bin/ruby /usr/local/bin/mongrel_rails start -e production -p 4543 -d
2008-05-26 09:16 PM
- Rahul
- Posts: 498
- Starts: 0
- Wiki Edits: 1
This issue is because the 'mongrel.pid' file is missing inside the log directory. This file actually contains the PID of the mongrel process. I.E in this case 21722
Since this file is missing the mongrel cannot restart as it cannot find the old mongrel process PID.
So in this cases you will need to kill the mongrel PID manually.
Run the command 'kill -9 <Mongrel PID>'
In this case it is 'kill -9 21722' . then you will need to start the mongrel process again.
Since this file is missing the mongrel cannot restart as it cannot find the old mongrel process PID.
So in this cases you will need to kill the mongrel PID manually.
Run the command 'kill -9 <Mongrel PID>'
In this case it is 'kill -9 21722' . then you will need to start the mongrel process again.
2008-05-26 09:53 PM
Regards,Rahul
- Freeform
- Posts: 33
- Starts: 5
- Wiki Edits: 0
- Location: Chicago
Super, that seemed to do the trick, thanks!