Mongrel Error causing 500 redirects


#1

Just today I’ve started to get errors in my system that show up like
this in my development.log file

/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:231b:211:in
run'run’’.rb:117:in process'sion_management_support' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:231b:211:inrun’run''.rb:117:inprocess’sion_management_support’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:231b:211:in
run'run’’.rb:117:in `process’sion_management_support’

I’m not sure what I could have changed that would cause these errors or
if it was even something I did. When this error happens, my rails app
issues the 500 Internal Server Error page and the whole session crashes.
you need to close your browser and clear your cache before you can use
my app again?

Anyone seen anything like this or have any idea where to begin looking?


#2

this is the full listing from the development.log file

Jan 12 12:51:08 rpdev1 rails[17520]: marshal data too short
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session/active_record_store.rb:82:in
load' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session/active_record_store.rb:82:inunmarshal’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session/active_record_store.rb:120:in
data' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session/active_record_store.rb:300:inrestore’
/usr/lib/ruby/1.8/cgi/session.rb:304:in []' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/cgi_process.rb:114:insession’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/cgi_process.rb:142:in
stale_session_check!' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/cgi_process.rb:108:insession’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:918:in
assign_shortcuts_without_flash' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/flash.rb:141:inassign_shortcuts’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:402:in
process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:inprocess_without_session_management_support’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in
process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:indispatch’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/rails.rb:84:in
process' /usr/lib/ruby/1.8/sync.rb:229:insynchronize’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/rails.rb:83:in
process' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:580:inprocess_client’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:579:in
each' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:579:inprocess_client’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:686:in run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:686:ininitialize’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:686:in new' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:686:inrun’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:673:in
initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:673:innew’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:673:in run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/configurator.rb:267:inrun’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/configurator.rb:266:in
each' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/configurator.rb:266:inrun’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:127:in
run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/command.rb:211:inrun’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:231
/usr/bin/mongrel_rails:18:in `load’
/usr/bin/mongrel_rails:18


#3

That problem has nothing to do with mongrel. Its a problem with your
session handling code. 95% of the time that people get the marshal
data too short error it’s caused by storing too much data in the
session. Or storing complete AR objects in the session. If you are
storing full AR objects in the sessions then change your code to just
store the id in the session and do a lookup on that id in a before
filter.

-Ezra

On Jan 12, 2007, at 9:58 AM, Craig J. wrote:

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
cgi_process.rb:142:in
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/rails.rb:
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:579:in
`initialize’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/


Posted via http://www.ruby-forum.com/.

– Ezra Z.
– Lead Rails Evangelist
– removed_email_address@domain.invalid
– Engine Y., Serious Rails Hosting
– (866) 518-YARD (9273)