Forum: Ruby on Rails RE: ROR Production issue

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.
60e38de043848f82392062088f191213?d=identicon&s=25 Hogan, Brian P. (Guest)
on 2006-02-06 23:45
(Received via mailing list)
The only way I know to handle this is by hacking your dispatch.fcgi.
This is a real problem on Dreamhost.


require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'

# fix for random 500 errors
class MyHandler < RailsFCGIHandler
  SIGNALS = {
    'TERM' => :exit_now,
  }

  def exit_now_handler(signal)
    dispatcher_log :info, "ignoring request to terminate immediately"
  end
end
# end fix for random 500 errors

# original handler
# RailsFCGIHandler.process!

MyHandler.process!

--------

Also consider a cron job to periodically hit one of your non-cached
actions every so often to keep the application "fresh".
This topic is locked and can not be replied to.