Hi,
I am running a Rails app on Dreamhost, which has what I think is a
fairly standard Apache/Mysql/Fcgi setup.
My app hung this morning after several days of event-free operation…
there was nothing that showed up in the production log. The app was
just failing to respond. I tried restarting it once, which didn’t seem
to work… When trying to access it from my browser, I got the “Rails
application failed to start” page. I restarted it again and it came
back up.
The problem may not have anything to do with fcgi, but I looked at the
fastcgi.crash.log and saw ominous messages, does this exception mean
anything to anyone? Any suggestion of what happened here and how I can
prevent future issues?
Best,
Eric
tail of fastcgi.crash.log:
[22/Nov/2006:11:04:34 :: 1628] starting
[22/Nov/2006:11:14:37 :: 31977] starting
[22/Nov/2006:11:14:36 :: 21758] starting
[22/Nov/2006:11:16:51 :: 10277] Dispatcher failed to catch: SIGUSR2
(SignalException)
/usr/lib/ruby/1.8/fcgi.rb:597:in each' /usr/lib/ruby/1.8/fcgi.rb:597:in
each_cgi’
…/config/…/vendor/rails/railties/lib/fcgi_handler.rb:53:in
process!' ../config/../vendor/rails/railties/lib/fcgi_handler.rb:23:in
process!’
dispatch.fcgi:39
killed by this error
[22/Nov/2006:11:16:50 :: 12042] Dispatcher failed to catch: SIGUSR2
(SignalException)
/usr/lib/ruby/1.8/fcgi.rb:597:in each' /usr/lib/ruby/1.8/fcgi.rb:597:in
each_cgi’
…/config/…/vendor/rails/railties/lib/fcgi_handler.rb:53:in
process!' ../config/../vendor/rails/railties/lib/fcgi_handler.rb:23:in
process!’
dispatch.fcgi:39
killed by this error
[22/Nov/2006:11:24:49 :: 27786] starting
[22/Nov/2006:11:24:49 :: 6299] starting
[22/Nov/2006:11:24:52 :: 7887] starting
[22/Nov/2006:11:24:56 :: 25160] starting
The meat of my dispatch.fcgi looks like this … I basically stole this
from a Dreamhost posting. I don’t pretend to understand how it works.
.
.
.
require File.dirname(FILE) + “/…/config/environment”
require File.dirname(FILE) +
“/…/vendor/rails/railties/lib/fcgi_handler”
require File.dirname(FILE) + “/…/config/environment”
require ‘fcgi_handler’
class RailsFCGIHandler
SIGNALS = {
‘TERM’ => :exit_now,
}
def exit_now_handler(signal)
dispatcher_log :info, "ignoring request to terminate
immediately"
end
end
RailsFCGIHandler.process!