[typo] A little extra stability

Gary Shewan gpsnospam at gmail.com
Wed Jun 21 06:37:20 EDT 2006

I'm on Dreamhost and this definitely works for me, but it might be  
worthwhile if you try it on your own hosting provider.  I've said for  
a while now that most of the time I don't have problems with Typo ...  
but with Rails and fastcgi and everything else playing nicely together.

I noticed this in the Dreamhost wiki:

"Dreamhost regularly kills off sleeping processes with their  
watchdog. This will kill your dispatch.fcgi processes, leading to  
Error 500s from time to time. You'll need to make dispatch.fcgi  
ignore all TERM requests by changing how it responds to them."

Sounded very familiar to me so I put the following in dispatch.fcgi  
(after require 'fcgi_handler'):

class RailsFCGIHandler
    def frao_handler(signal)
      dispatcher_log :info, "asked to terminate immediately"
      dispatcher_log :info, "frao handler working its magic!"
    alias_method :exit_now_handler, :frao_handler


I'd had that code in last summer, and it'd been replaced in an  
upgrade and I'd never put it back.  To be honest with you after the  
release of Rails 1 (and rake and something else I think) I was under  
a misconception that I wouldn't need it anymore.  But it really has  
made a *massive* difference to the number of errors I get.

Dare I say it? ... the install is stable.  My log sizes have dropped  
by 70% at least.  In fact looking in the fastcgi crash log I can see  
that it's working:

[21/Jun/2006:01:49:43 :: 4123] asked to terminate immediately
[21/Jun/2006:01:49:43 :: 4123] frao handler working its magic!
[21/Jun/2006:01:49:43 :: 4123] asked to restart ASAP

May be well worth putting that into dispatch.fcgi ... can't see it  


More information about the Typo-list mailing list