Jeff Pritchard
2007-Feb-25 01:26 UTC
marshal data too short -- getting this all the time now
I''m getting this never before seen error quite a bit all of a sudden: marshal data too short It shows up as an application error just after a "stale_session_check" in the stack dump in the error log. Anybody know what it means? Why it happens? The only solution I''ve found so far is to use mySQL admin to delete the session data. It has been happening often enough today that it is really slowing me down but I have no clue what''s broke. thanks, jp -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
jens wille
2007-Feb-25 10:06 UTC
Re: marshal data too short -- getting this all the time now
hi jeff! Jeff Pritchard [25.02.2007 02:26]:> I''m getting this never before seen error quite a bit all of a > sudden: marshal data too shortwhat helped in my case was to set the type of the ''data'' column in the ''sessions'' table to ''longtext'' (or ''mediumtext'') instead of ''text''. note, however, that this is specific to mysql and if you''re using migrations you need to set it manually: t.columns << ''data longtext'' (at the end of your ''create_table'' block). hth jens -- Jens Wille, Dipl.-Bibl. (FH) prometheus - Das verteilte digitale Bildarchiv für Forschung & Lehre An St. Laurentius 4, 50931 Köln Tel.: +49 (0)221 470-6668, E-Mail: jens.wille-31N1O1AsgN5n68oJJulU0Q@public.gmane.org http://www.prometheus-bildarchiv.de/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jeff Pritchard
2007-Feb-25 16:54 UTC
Re: marshal data too short -- getting this all the time now
jens wille wrote:> what helped in my case was to set the type of the ''data'' column in > the ''sessions'' table to ''longtext'' (or ''mediumtext'') instead of ''text''. > > note, however, that this is specific to mysql and if you''re using > migrations you need to set it manually: t.columns << ''data longtext'' > (at the end of your ''create_table'' block). > > hth > jensInteresting. I''ll give it a try. Thanks! jp -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Mathieu Jobin
2007-Mar-06 03:13 UTC
Re: marshal data too short -- getting this all the time now
I''m having the same problem as jeff. ''marshal data too short'' but I am not using mysql for session storage. I left it to the default and the sessions are stored on disk. I have 27000 registered users on my system and this problem happens for only two of these users. I have no idea what that could be from.... jens wille wrote:> hi jeff! > > Jeff Pritchard [25.02.2007 02:26]: >> I''m getting this never before seen error quite a bit all of a >> sudden: marshal data too short > what helped in my case was to set the type of the ''data'' column in > the ''sessions'' table to ''longtext'' (or ''mediumtext'') instead of ''text''. > > note, however, that this is specific to mysql and if you''re using > migrations you need to set it manually: t.columns << ''data longtext'' > (at the end of your ''create_table'' block). > > hth > jens > > -- > Jens Wille, Dipl.-Bibl. (FH) > prometheus - Das verteilte digitale Bildarchiv f�r Forschung & Lehre > An St. Laurentius 4, 50931 > K�lnTel.: +49 (0)221 470-6668, E-Mail: jens.wille-31N1O1AsgN5n68oJJulU0Q@public.gmane.org > http://www.prometheus-bildarchiv.de/-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Milan Iliev
2007-Mar-06 20:16 UTC
Re: marshal data too short -- getting this all the time now
Hi Mathieu, ''marshal data too short'' is usually caused by the session data column in the sessions table being too short to handle large session data. Whatever the database you''re using, the default migration sets it to a preset size (TEXT in MySQL) and if your session is too large, it will cause the marshaled data checksum to fail. Try setting your column type to something larger (in MySQL, LONGTEXT works better). Mathieu Jobin wrote:> I''m having the same problem as jeff. ''marshal data too short'' but I am > not using mysql for session storage. I left it to the default and the > sessions are stored on disk. I have 27000 registered users on my system > and this problem happens for only two of these users. I have no idea > what that could be from.... > > > jens wille wrote: >> hi jeff! >> >> Jeff Pritchard [25.02.2007 02:26]: >>> I''m getting this never before seen error quite a bit all of a >>> sudden: marshal data too short >> what helped in my case was to set the type of the ''data'' column in >> the ''sessions'' table to ''longtext'' (or ''mediumtext'') instead of ''text''. >> >> note, however, that this is specific to mysql and if you''re using >> migrations you need to set it manually: t.columns << ''data longtext'' >> (at the end of your ''create_table'' block). >> >> hth >> jens >> >> -- >> Jens Wille, Dipl.-Bibl. (FH) >> prometheus - Das verteilte digitale Bildarchiv f�r Forschung & Lehre >> An St. Laurentius 4, 50931 >> K�lnTel.: +49 (0)221 470-6668, E-Mail: jens.wille-31N1O1AsgN5n68oJJulU0Q@public.gmane.org >> http://www.prometheus-bildarchiv.de/-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Mathieu Jobin
2007-Apr-05 00:48 UTC
Re: marshal data too short -- getting this all the time now
Hi Milan, thanks for your answer. but I dont use a DB for session storage, but the default on disk in RAILS_ROOT/tmp/sessions I only store IDs and short strings in the session, no big object. i really don''t understand why I am getting this error. and I am getting this error only when 3 of my 27000 users login. it works fine for most people. I''m out of ideas.... Milan Iliev wrote:> Hi Mathieu, > > ''marshal data too short'' is usually caused by the session data column in > the sessions table being too short to handle large session data. > Whatever the database you''re using, the default migration sets it to a > preset size (TEXT in MySQL) and if your session is too large, it will > cause the marshaled data checksum to fail. Try setting your column type > to something larger (in MySQL, LONGTEXT works better). > > Mathieu Jobin wrote: >> I''m having the same problem as jeff. ''marshal data too short'' but I am >> not using mysql for session storage. I left it to the default and the >> sessions are stored on disk. I have 27000 registered users on my system >> and this problem happens for only two of these users. I have no idea >> what that could be from.... >> >> >> jens wille wrote: >>> hi jeff! >>> >>> Jeff Pritchard [25.02.2007 02:26]: >>>> I''m getting this never before seen error quite a bit all of a >>>> sudden: marshal data too short >>> what helped in my case was to set the type of the ''data'' column in >>> the ''sessions'' table to ''longtext'' (or ''mediumtext'') instead of ''text''. >>> >>> note, however, that this is specific to mysql and if you''re using >>> migrations you need to set it manually: t.columns << ''data longtext'' >>> (at the end of your ''create_table'' block). >>> >>> hth >>> jens >>> >>> -- >>> Jens Wille, Dipl.-Bibl. (FH) >>> prometheus - Das verteilte digitale Bildarchiv f�r Forschung & Lehre >>> An St. Laurentius 4, 50931 >>> K�lnTel.: +49 (0)221 470-6668, E-Mail: jens.wille-31N1O1AsgN5n68oJJulU0Q@public.gmane.org >>> http://www.prometheus-bildarchiv.de/-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Marco Kotrotsos
2007-May-05 14:01 UTC
Re: marshal data too short -- getting this all the time now
I believe this has something to do with a corrupt session file. If you empty out your tmp/session dir or remove the session files of those people it will probably work again. Let me know what happened. Marco Mathieu Jobin wrote:> Hi Milan, thanks for your answer. > but I dont use a DB for session storage, but the default on disk in > RAILS_ROOT/tmp/sessions > > I only store IDs and short strings in the session, no big object. > i really don''t understand why I am getting this error. > > and I am getting this error only when 3 of my 27000 users login. > it works fine for most people. > > I''m out of ideas.... > > > Milan Iliev wrote: >> Hi Mathieu,-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Aryk Grosz
2007-Jun-13 20:13 UTC
Re: marshal data too short -- getting this all the time now
Hey guys, Im experiencing the exact same thing. Normally the data column would never even be even close to reaching its character limit. The problem is that, all of a sudden, when data gets written to the session data column, its writes the data for a few lines and then starts repeating "YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh" until its out of space. Im sure thats causing the error. Anybody seen this before? Marco Kotrotsos wrote:> I believe this has something to do with a corrupt session file. If you > empty out your tmp/session dir or remove the session files of those > people it will probably work again. > > Let me know what happened. > Marco > > > > Mathieu Jobin wrote: >> Hi Milan, thanks for your answer. >> but I dont use a DB for session storage, but the default on disk in >> RAILS_ROOT/tmp/sessions >> >> I only store IDs and short strings in the session, no big object. >> i really don''t understand why I am getting this error. >> >> and I am getting this error only when 3 of my 27000 users login. >> it works fine for most people. >> >> I''m out of ideas.... >> >> >> Milan Iliev wrote: >>> Hi Mathieu,-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Larry Kluger
2007-Dec-05 15:51 UTC
Re: marshal data too short -- getting this all the time now
For MySQL db, here is the migration to change to longtext: [code] class ChangeSessions2 < ActiveRecord::Migration def self.up execute "ALTER TABLE sessions CHANGE COLUMN data data LONGTEXT" end def self.down end end [/code] Regards, LarryK -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, I ended up with this problem, but having a six hundred thousands records in my sessions table… Surely''ve been hacked; The site are protected with a simple login page (salt & hash, successful create a user session) and is just on the web for development/production testing. I wonder exactly how it has happenned; The logs don''t show any activities !!! might be something like XSS, but if it seems obvious for some of you, thanks for the info you''d provide.> For MySQL db, here is the migration to change to longtext: > > [code] > class ChangeSessions2 < ActiveRecord::Migration > def self.up > execute "ALTER TABLE sessions CHANGE COLUMN data data LONGTEXT" > end > > def self.down > end > end > > [/code] > > Regards, > > LarryK-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---