Forum: Ruby on Rails RE: Re: Production deployment on Dreamhost?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Hogan, Brian P. (Guest)
on 2006-01-12 22:42
(Received via mailing list)
Another solution that works the same way without the need to freeze gems
and hack the core.
http://discussion.dreamhost.com/showthreaded.pl?Ca...
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 ------
This topic is locked and can not be replied to.