# Mongrel Error causing 500 redirects

**URL:** <https://www.ruby-forum.com/t/mongrel-error-causing-500-redirects/81750>\
**Category:** Rails\
**Created:** [January 12, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/mongrel-error-causing-500-redirects/81750 "2007-01-12T18:13:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpjolicoeur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a183cd/32.png) [@cpjolicoeur](https://www.ruby-forum.com/u/cpjolicoeur)\
**Post date:** [January 12, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/mongrel-error-causing-500-redirects/81750/1 "2007-01-12T18:13:54Z")

</div>

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: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: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?

---

<div class="post-metadata">

**Author:** ![cpjolicoeur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a183cd/32.png) [@cpjolicoeur](https://www.ruby-forum.com/u/cpjolicoeur)\
**Post date:** [January 12, 2007, 6:58pm UTC](https://www.ruby-forum.com/t/mongrel-error-causing-500-redirects/81750/2 "2007-01-12T18:58:28Z")

</div>

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:in`unmarshal’  
/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:in`restore’  
/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:in`session’  
/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:in`session’  
/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:in`assign\_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:in`process\_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:in`dispatch’  
/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:in`synchronize’  
/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:in`process\_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:in`process\_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:in`initialize’  
/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:in`run’  
/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:in`new’  
/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:in`run’  
/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:in`run’  
/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:in`run’  
/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

---

<div class="post-metadata">

**Author:** ![cpjolicoeur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a183cd/32.png) [@cpjolicoeur](https://www.ruby-forum.com/u/cpjolicoeur)\
**Post date:** [January 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/mongrel-error-causing-500-redirects/81750/3 "2007-01-19T16:30:52Z")

</div>

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/](http://www.ruby-forum.com/).
> 
> >

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