Hi,
One of my site’s servers had a problem yesterday and the host
restarted it. During boot up Mongrel failed to start as the PID files
still existed in /log
I didn’t find out about this reboot until several hours later so the
site was down that entire time which is less than ideal.
Does anybody know of a way around this? Is there a built in way to
force Mongrel to start and overwrite any existing PID files?
I have the mongrel_cluster startup script setup correctly btw.
I have the mongrel_cluster startup script setup correctly btw.
I usually write some shell script to clear out the pid files, but
another way that works is to have mongrel put it’s pid files in the /tmp
directory which gets emptied on restart.
–
Daniel J.
Systems Administrator
PLANET ARGON, LLC
Ruby on Rails Development, Consulting & Hosting
Install the mongrel_cluster prerelease (soon to be released after I
recover from RailsConf) and change your pidfile location to /var/run/
mongrel_cluster (on linux). Be sure to copy the new init.d script out
of the gem source.
Hi,
One of my site’s servers had a problem yesterday and the host
restarted it. During boot up Mongrel failed to start as the PID files
still existed in /log
I didn’t find out about this reboot until several hours later so the
site was down that entire time which is less than ideal.
Does anybody know of a way around this? Is there a built in way to
force Mongrel to start and overwrite any existing PID files?
I have the mongrel_cluster startup script setup correctly btw.
Thanks in advance.
Regards,
Niall M.
On a related note.
A script like this will kill any mongrel instance that is hanging around
after its pid file is gone.
#!/usr/local/bin/ruby
----- Original Message -----
From: “David H.” [email protected]
To: [email protected]
Sent: Wednesday, June 20, 2007 2:21 PM
Subject: [Rails-deploy] Re: Mongrel failing to start on bootup as PID
files
still ex
Hi,
One of my site’s servers had a problem yesterday and the host
restarted it. During boot up Mongrel failed to start as the PID files
still existed in /log
I didn’t find out about this reboot until several hours later so the
site was down that entire time which is less than ideal.
Hello Niall – it looks like you have plenty of options for clearing
out those pesky PID files, but no one has addressed this part of your
email. Anything beyond a hobby site needs some sort of monitoring for
situations just like this. At RailsConf, Ezra specifically mentioned
using monit (which I currently use) to monitor one’s individual
mongrel processes. If that sounds like too much work, an excellent
alternative is the free Heartbeat website (http:// heartbeat.highgroove.com/) which allows you to monitor multiple
application URLs and email yourself when things go awry. I’d
encourage you to go sign up for heartbeat and see if using monit is
feasible for you. No financial connection to either one, just a very
satisfied user.
Jim
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.