[ACCEPTED]-marshal data too short-marshalling

Accepted answer
Score: 12

I met the exactly same problem.

My Rails 3 version is 4.1.4.

I solved this problem 2 by running:

rake tmp:clear                                      

Clear session, cache, and socket 1 files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tmp:sockets:clear)

Score: 8

Instead of the manual ALTER TABLE you could 3 also do a migration with a limit, like this:

class FixSessionStore < ActiveRecord::Migration
  def self.up
    change_column :sessions, :data, :text, :limit => 4.megabytes

  def self.down

This 2 will turn the column into a MEDIUMTEXT and 1 also show up correctly in your schema.rb.

Score: 7

In Rails 4 development mode I had the same 4 error and the solution was the following:

Delete 3 all cache file from /tmp/cache/assets folder.

(Unfortunately 2 rake assets:clean just haven't solved this 1 problem.)

Score: 6

What shows up in the error log after you 18 access the page that gives that error?

Also, what 17 is the column type for your session information 16 in MySQL? TEXT?

------------- EDIT BELOW 15 ----------------

Ok, as far as I've been 14 able to determine, this error generally 13 means that the size of the content that 12 you are shoving in the session is too large 11 for the MySQL column. The most common solution 10 cited seems to point towards a solution 9 of changing the column from TEXT to LONGTEXT.

Try 8 running something like this in MySQL and 7 see if it gives you any improvement:


The 6 obvious solution is to not store the CSV 5 data in the session as that's probably not 4 the best place to put it, but I don't know 3 your reasons behind what you're doing, so 2 maybe you have no other options.

Give that 1 a try and let me know if it worked.

Score: 3

The previous solutions didn't work for me. What 2 did work for me was to clear the session's 1 cache with

rake db:sessions:clear
Score: 0

This worked for me

rm -rf tmp/cache


More Related questions