Another solution that works the same way without the need to freeze gems
and hack the core.
http://discussion.dreamhost.com/showthreaded.pl?Cat=&Board=forum_program
ming&Number=36448&page=&view=&sb=&o=&vc=1#Post36448
— snip -----
I changed my dispatch.fcgi to this. Something is sending the fastcgi
processes a kill ‘TERM’ after five minutes. This makes the rails app
ignore it and the fcgi process stays running.
require File.dirname(FILE) + “/…/config/environment”
require ‘fcgi_handler’
class MyRailsFCGIHandler < RailsFCGIHandler
SIGNALS = {
‘TERM’ => :exit_now,
}
def exit_now_handler(signal)
dispatcher_log :info, “ignoring request to terminate immediately”
end
end
MyRailsFCGIHandler.process! nil, 50
— snip ------