How to solve "Marshal Data Too Short" error?


#1

Hi

I’ve got the error in the log file “marshal data too short” after I try
to store some data into session.

After doing some research on the internet, it looks like the problem was
caused by pstore.rb. It is there way to solve this problem?

Thank you


#2

What I did is the following

session[‘id’] = nil
or
session[‘id’] = some value


#3

Which session store are you using? If it’s the ActiveRecord store,
the error can occur when the data in your session exceeds the size of
the ‘data’ column in your sessions table. You can either increase the
size of the data field, or examine more closely what is being stored
in your session data.

Cheers,

-DF


#4

David F. wrote:

Which session store are you using? If it’s the ActiveRecord store,
the error can occur when the data in your session exceeds the size of
the ‘data’ column in your sessions table. You can either increase the
size of the data field, or examine more closely what is being stored
in your session data.

Cheers,

-DF

Thank you David

I am trying to store one integer (the id) into the session and the value
is < 100.


#5

Jack C. wrote:


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

Jack, can you submit your message again? I can only see an empty
message.

Thank you

Victor


#6

Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails


#7

Just another thought, is there any other way to replace the use of
session hash?

Thank you for replying!

Victor