I just ran across an alternative to Pound / Pen for Mongrel balancing…
PLB.
Just registered for the Mountain West Ruby Conference to be held back in SLC, UT in March. See you there.
Yes!
As of 2:14pm today I’m the proud owner of the ultimate cubicle warfare weapon: The Airzooka Air Gun from the great folks at ThinkGeek.
The entire 2nd floor better watch their back.
It all started with faulty power at one of our hosting areas. I use the term “hosting area” as lightly as possible. Servers would stop responding and we’d get the call. “Wait… is that in building 2?”, we’d ask ourselves. If the answer was yes then we’d get in the car and head on down to physically restart the server. Now - before you go off about what a piece of crap setup we have and how it reflects badly on me as a Senior SysAdmin - just wait. I have nothing to do with the current situation. All those boxen were supposed to be transfered to a VM eons ago. We’ve tried all in our power to fix it. As my fellow sysadmin likes to say, “My Care is Broken.” We just laugh and go on working with things we can fix.
All of the “servers” in said building 2 are supposed to be Dev / QA only. How can one expect to run production code in a lousy place like that? For reasons I have yet to understand, a nice little Rails app was pushed into production without a production server to put it on. “We’ll just run it on the QA box, right?” uhh… yeah, whatever. I found out about only after the fact, so I said, “I’ll do the best I can to keep pound and the mongrel cluster up, but no promises there.”
It got to be a an issue - having to restart pound and mongrel on the box - but I was busy with other projects to fix it right away. I’ve now learned my lesson: Throw monit on there right away and be done with it.
FYI: Our setup looks something like lighttpd -> pound -> mongrel_cluster. It’s not the final setup we’ll be using for prod, but it’s great for now.
After a 1/2 day of tweaking and experimenting here’s my /etc/monitrc:
(some names have been changed to protect the innocent)
set daemon 120
set logfile syslog facility log_daemon
## Little monit webserver
set httpd port 2812 and
allow 10.0.0.0/8
allow localhost
allow admin:[super secret password here]
###### Pound #######
check process pound with pidfile /var/run/pound.pid
start program = “/etc/init.d/pound start”
stop program = “/etc/init.d/pound stop”
if failed host 127.0.0.1 port 88 protocol http
with timeout 10 seconds
then restart
###### 411 App ######
# Mongrel-4000
check process mongrel-4000 with pidfile /home/[user dir]/apps/411/current/log/mongrel.4000.pid
group mongrel-411
start program = ” /usr/local/bin/ruby /usr/local/bin/mongrel_rails start -d -e qa -p 4000 -a 127.0.0.1 -P /home/[user dir]/apps/411/current/log/mongrel.4000.pid -c /home/[user dir]/apps/411/current/” as uid and
stop program = ” /usr/local/bin/ruby /usr/local/bin/mongrel_rails stop -p 4000 -P /home/[user dir]/apps/411/current/log/mongrel.4000.pid -c /home/[user dir]/apps/411/current/” as uid [user] and gid [group]
if failed host 127.0.0.1 port 4000 protocol http
with timeout 10 seconds
then restart
# (Repeat for other mongrels in the cluster… 4001, etc)
I threw monit in the inittab for those nasty restarts:
# Run monit in standard run-levels
mo:2345:respawn:/usr/local/bin/monit -Ic /etc/monitrc
A friend of mine came up with this great idea for a podcast: “make it easy for members of the LDS Church to be a bit better prepared for Sunday School, Relief Society, and Priesthood”
He pulls together talks and scriptures that have to do with the upcoming lessons for the month. Download and be prepared for class!
Best of 2006 Mashups:
http://www.bootieusa.com/bestofbootie2006/
(You gotta love that url)
One of the coolest things about Linux is the whole FUSE concept. I used SSHfs all the time on my ubuntu box to connect to development servers and write code locally. Now that I use OSX I’ve been searching for something like this to no avail. Thanks to google and some passionate engineers it’s now working.
I can imagine a slew of Rails developers using this to have textmate edit files over ssh directly without the scp/sftp workaround.
Apple iPhone: Will it run Ruby? Leopard will have it
Once again I’ve falled in love my MythTV. I’ve been running it for about 5 months solid now. no reboots, or big issues to deal with. A few recent tweaks: Added my ROM collection over a remote share for MythGame. New favorite mythtv theme: blootube. I transcode any new recordings to XviD (with commercial skip) and then move them to my NAS video share for future viewing.
Recent change of heart: Fav Desktop OS -> OSX. Still really love Ubuntu for servers, etc.
This time of year I love living in Arizona. Did you get snow recently? Gee… that’s too bad. I think we’re looking at 68 today. LOL!