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".
-----Original Message-----
From: rails-bounces@lists.rubyonrails.org
[mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of David Genord
II
Sent: Monday, February 06, 2006 12:58 PM
To: rails@lists.rubyonrails.org
Subject: Re: [Rails] ROR Production issue
I had an issue where the mysql connection would go stale. I had to setup
an exception handler that reset the mysql connection when the exception
occurred. It wasn''t a pretty solution but it worked.
On 2/6/06, GeekEntrepreneu <geekentrepreneur@gmail.com>
wrote:>
> Currently I am not getting much traffic on my site, when I visit my
> site after a long interval I get the dreaded "Rails application
error"
> in Mozilla/ "Internal server error" in IE.Once I click refresh
then
> the site comes to life. My guess is this is due to the fact that all
> FCGI process have died and there are no active listeners.
>
> Has anyone else experienced this issue. How does one ensure that there
> is always a FCGI process running in the background.
>
>
> LG
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>
_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails