I''m struggling with activerecord and mysql blobs (uploading files)... blobs over 400K-ish cause the below exception... ActiveRecord::StatementInvalid in File#upload Mysql::Error: Lost connection to MySQL server during query: I''ve tried blob, mediumblob, and longblob... I''m using windows xp for development - and have not installed the mysql gem... simlar google postings/solutions have not worked thoughts/suggestions? -- Posted via ruby-forum.com.
Suggestion to use file_column.. Sorry if you can''t do this.. I''m pretty sure any DB expert will say you storing blobs in database must suck. barinek wrote:> I''m struggling with activerecord and mysql blobs (uploading files)... > > blobs over 400K-ish cause the below exception... > > ActiveRecord::StatementInvalid in File#upload > > Mysql::Error: Lost connection to MySQL server during query: > > > I''ve tried blob, mediumblob, and longblob... > > I''m using windows xp for development - and have not installed the mysql > gem... > > simlar google postings/solutions have not worked > > thoughts/suggestions? >-- Yaroslav Markin yaroslav at markin dot net
I''m fighting the exact same issue right now myself - so very interested in seeing if someone comes back with an answer for it. I did find some old posts here in the mailing list that suggest that error has to do with some buggy mysql bindings in windows and pointed to this page wiki.rubyonrails.org/rails/pages/HowToUseMySQLRubyBindingsOnWin32 i installed the dll bu haven''t gotten it to work yet. Was also going to try porting the code over to my linux webserver either tonight / tommorow to see if the problem does go away once it''s off of XP. On 3/21/06, barinek <barinek@gmail.com> wrote:> I''m struggling with activerecord and mysql blobs (uploading files)... > > blobs over 400K-ish cause the below exception... > > ActiveRecord::StatementInvalid in File#upload > > Mysql::Error: Lost connection to MySQL server during query: > > > I''ve tried blob, mediumblob, and longblob... > > I''m using windows xp for development - and have not installed the mysql > gem... > > simlar google postings/solutions have not worked > > thoughts/suggestions? > > -- > Posted via ruby-forum.com. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > lists.rubyonrails.org/mailman/listinfo/rails >
Update - looks like I was able to solve my issue by merely increasing the mysql max_allowed_packet parameter. hopefully that''ll solve yours too -Eldon On 3/21/06, Bamat Est <bamatest@gmail.com> wrote:> I''m fighting the exact same issue right now myself - so very > interested in seeing if someone comes back with an answer for it. > > I did find some old posts here in the mailing list that suggest that > error has to do with some buggy mysql bindings in windows and pointed > to this page > > wiki.rubyonrails.org/rails/pages/HowToUseMySQLRubyBindingsOnWin32 > > i installed the dll bu haven''t gotten it to work yet. Was also going > to try porting the code over to my linux webserver either tonight / > tommorow to see if the problem does go away once it''s off of XP. > > > > > > On 3/21/06, barinek <barinek@gmail.com> wrote: > > I''m struggling with activerecord and mysql blobs (uploading files)... > > > > blobs over 400K-ish cause the below exception... > > > > ActiveRecord::StatementInvalid in File#upload > > > > Mysql::Error: Lost connection to MySQL server during query: > > > > > > I''ve tried blob, mediumblob, and longblob... > > > > I''m using windows xp for development - and have not installed the mysql > > gem... > > > > simlar google postings/solutions have not worked > > > > thoughts/suggestions? > > > > -- > > Posted via ruby-forum.com. > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > lists.rubyonrails.org/mailman/listinfo/rails > > >
very cool - that worked... - Barinek -- Posted via ruby-forum.com.