Failsafe errors since upgrading to 2.3


#1

Since upgrading to 2.3, this error shows up dozens of times a day, and
I have no idea what’s causing it. Anyone have any ideas?

Processing ApplicationController#index (for 62.75.252.249 at
2009-03-22 13:23:08) [GET]
Rendering /home/andrew/public_html/mysite/public/404.html (404 Not
Found)
/!\ FAILSAFE /!\ Sun Mar 22 13:24:09 -0700 2009
Status: 500 Internal Server Error
undefined method []' for nil:NilClass /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ session/cookie_store.rb:106:incall’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
failsafe.rb:11:in call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ vendor/rack-1.0/rack/lock.rb:11:incall’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
vendor/rack-1.0/rack/lock.rb:11:in synchronize' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ vendor/rack-1.0/rack/lock.rb:11:incall’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
dispatcher.rb:106:in call' /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/ rack/request_handler.rb:65:inprocess_request’
/usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/
abstract_request_handler.rb:197:in main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/ railz/application_spawner.rb:340:instart_request_handler’
/usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/
railz/application_spawner.rb:298:in handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/ utils.rb:176:insafe_fork’
/usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/
railz/application_spawner.rb:296:in handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/ abstract_server.rb:332:insend
/usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/
abstract_server.rb:332:in main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/ abstract_server.rb:182:instart_synchronously’
/usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/
abstract_server.rb:149:in start' /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/ railz/application_spawner.rb:192:instart’
/usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/
spawn_manager.rb:260:in spawn_rails_application' /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/ abstract_server_collection.rb:121:inlookup_or_add’
/usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/
spawn_manager.rb:254:in spawn_rails_application' /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/ abstract_server_collection.rb:75:insynchronize’
/usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/
abstract_server_collection.rb:74:in synchronize' /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/ spawn_manager.rb:253:inspawn_rails_application’
/usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/
spawn_manager.rb:148:in spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/ spawn_manager.rb:285:inhandle_spawn_application’
/usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/
abstract_server.rb:332:in __send__' /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/ abstract_server.rb:332:inmain_loop’
/usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/
abstract_server.rb:182:in `start_synchronously’
/usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/bin/passenger-spawn-
server:50


#2

On Sun, Mar 22, 2009 at 2:45 PM, AtsoK removed_email_address@domain.invalid wrote:

Since upgrading to 2.3, this error shows up dozens of times a day, and
I have no idea what’s causing it. Anyone have any ideas?

[ snip error listing ]

So, please tell us about your configuration? When do these error occur
exactly?
If this is a production application, have you done any load testing
locally
to reproduce
these error messages? Did you update your rails configurations when
moving
from 2.1.2
to 2.3.2 (i.e. rake rails:update)?

-Conrad


#3

Certainly, it’s on Ubuntu 8.04, using Passenger 2.1.2, and yes I
changed the version number in environment.rb + ran that rake command.
I commented out my config.log_level line so I can see when that error
occurs, but it’s popping up in random places (not just happening when
a certain action gets called – I’ve been going to the locations that
have been called right before the error occurs, but everything works
fine for me). I haven’t done any load testing.


#4

I had this happen to me recently and found this post to be useful.

http://billkirtley.wordpress.com/2009/03/03/failsafe-handling-with-rails/

I don’t think that will solve your problem though as it’s particular
to mongrel, but it should provide some framework to work from.

My understanding is that FAILSAFE happens when another error is being
recued_in_public and the rescuing itself throws an error.

Good luck!


#5

i dont know about any other error but the first error dat i
encountered while convertiong it ti rails 2.3.2 was uninitialized
application cntroller and i just renamed application.rb
to application_controller.rb


#6

Hi everyone, posting to let you know that I discovered that this error
pops up every time I go to /session. Though I’m not sure how the error
could occur all the time unless people go to straight to mysite.com/
session or something. Logging in works for me (and everyone else as
far as I can tell). I’m using the latest update of restful-
authentication. Thanks!


#7

On Tue, Mar 24, 2009 at 6:26 AM, pankaj88 removed_email_address@domain.invalid
wrote:

i dont know about any other error but the first error dat i
encountered while convertiong it ti rails 2.3.2 was uninitialized
application cntroller and i just renamed application.rb
to application_controller.rb

rake rails:update does that for you (in 2.3.2 anyway).


Greg D.
http://destiney.com/


#8

I can reproduce the exact same behaviour as Andrew above with 2.3.3, app
works otherwise but any /session urls result in the error because the
“options” variable in cookie_store#call mysteriously evaluates to nil.


#9

Actually, looks like any route that is not found can trigger the same
failsafe error, no matter if we use cookie store or the active record
store (in latter case the exception is just raised in
absract_session_store instead).


#10

The problem I reported above was solved simply by updating the
exceptional plugin from version 0.0.2. (!) to 2.0.7.

Posting this here in case someone else has failed at keeping their gems
up-to-date when upgrading to Rails 2.3.