I think this should help the Error 500 problem. I get Error 500 when Apache has my Rails app halfway up. By stabilzing my fcgi process I reduce that window. I can also see that my FCGI process is getting swapped out when idle so it shouldn't be consuming resources.
The -TERM that comes five minutes after starting is likely a source of Error 500 too. -TERM will kill the process in the middle of a request. You need to send -USR1 for a graceful shutdown. The way Rails is currently implemented receiving the USR1 does nothing initially, but after the next web request comes in the fcgi process exits and restarts itself. dreamhost still sends my FCGI process a USR1 signal every four hours.
I'm using this code now and it seems to be working. I've been playing around with code to do an immediate restart on -USR1 but it is complex to do in the Rails current code. I'm also trying to figure out how to write an FCGI authorize handler.
ENV['GEM_PATH']='/home/jonsmirl/gems' if ENV["RAILS_ENV"] == "production"
class MyRailsFCGIHandler < RailsFCGIHandler
def initialize(log_file_path = nil, gc_request_period = nil)
dispatcher_log :info, "ignoring request to terminate immediately"
MyRailsFCGIHandler.process! nil, 50