Matthew Beale
2008-Nov-11 17:30 UTC
[Facebooker-talk] Facebooker config goes away in production
Hi all, I''ve been having some issues with facebooker in production. The server is a CentOs box with thin v1.0.0, ruby v1.8.6-287 & frozen rails 2.1.2. I just updated to the latest rev of facebooker this morning (for action_links, nice), but we''ve been pretty up to date even before now. Is anyone else deployed on a similar setup? The bug is facebooker''s configuration goes away. This usually happens after a few hours of being up. The only theory I have right now is that thin is reloading classes after they get "stale" and overwriting configuration data. It looks like the "Facebooker" constant itself becomes a hash (see the last exception below). Sometimes this results in a literal config missing error: ------------- Facebooker::Session::ConfigurationMissing: Could not find configuration information for secret vendor/plugins/facebooker/lib/facebooker/session.rb, line 529 vendor/plugins/facebooker/lib/facebooker/session.rb:529:in `report_inability_to_find_key'' vendor/plugins/facebooker/lib/facebooker/session.rb:77:in `secret_key'' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:154:in `verify_signature'' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:140:in `verified_facebook_params'' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:50:in `facebook_params'' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:78:in `valid_session_key_in_session?'' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:56:in `session_already_secured?'' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:26:in `set_facebook_session'' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:224:in `ensure_authenticated_to_facebook'' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:229:in `ensure_application_is_installed_by_facebook_user'' ---------- and sometimes in a variety of other exceptions: ------------ NoMethodError: undefined method `is_for?'' for #<Hash:0x2aaaaf092890> vendor/plugins/facebooker/lib/facebooker.rb, line 102 vendor/plugins/facebooker/lib/facebooker.rb:102:in `is_for?'' vendor/plugins/facebooker/lib/facebooker/adapters/bebo_adapter.rb:52:in `collect'' vendor/plugins/facebooker/lib/facebooker/models/user.rb:112:in `populate'' vendor/plugins/facebooker/lib/facebooker/model.rb:35:in `uid'' ------------ ---------- NoMethodError: undefined method `api_key'' for #<Hash:0x2aaaaf092390> vendor/plugins/facebooker/lib/facebooker.rb, line 108 vendor/plugins/facebooker/lib/facebooker.rb:108:in `send'' vendor/plugins/facebooker/lib/facebooker.rb:108:in `api_key'' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:115:in `new_facebook_session'' ----------- Mike or David, does it make sense that reloading the facebooker classes would blow away the config? -- Matthew Beale :: 607 227 0871 Resume & Portfolio @ http://madhatted.com