This project is archived and is in readonly mode.
2.3.2 marshalling problem - Browser shows error 500
-
Eric Perko
Did you resolve this problem? I am experiencing the same error on Rails 2.3.2
-
CancelProfileIsBroken
- Tag changed from 2.3.2 to 2.3.2, bugmash
-
John Pignata
I could not replicate this using a small hash of six strings. It's possible that one of your six hash members is a large object and is being marshaled into something huge? I'd first check exactly what I'm putting into session and understand why it's generating so much data. If this is unavoidable, use active_record_store instead of cookie store.
-
Elad Meidar
I think that's expected, obviously one of the values in your hash resolves to a large string, simply because it's a large object, can you check what is in your hash? i was unable to replicate it using:
- hash of strings (length = 6)
- hash of simple, small instances of a model (length = 6)
- hash of 1 char strings (length = 500)
-
Rizwan Reza
not reproducible
-1 Agreed with John.
-
Jeremy Kemper
- State changed from new to invalid
- Tag changed from 2.3.2, bugmash to 2.3.2
- Milestone cleared.
-
Eric Perko
For future reference, I finally got around to looking into this problem and was able to figure it out. In a nutshell, our session was holding an entire ActiveRecord object, not just its ID (which was a bad idea anyways). Because of this, the newer marshalling code in Rails 2.3 was trying to serialize enough data to put the object back together later. This worked for some users, but for the majority, eventually a query or two loaded up some associations for the object in the session; loading up associations made for even more data that marhsal thought it needed to serialize. Eventually, some functionality queried enough to pull in a huge chunk of data, causing marshal to go from outputting about 2KB to like 25KB. If anyone experiences this in the future, try changing out the ActiveRecord object for just the ID and see if that fixes your problem.