Wes Gamble
2007-Jan-10 22:28 UTC
MySQL lost connection errors - related to DB session store?
All, Win XP MySQL 5.1.x Rails 1.1 I recently changed the session store in my app from file to DB (MySQL) and now I seem to be getting "Lost connection to MySQL server during query:" errors from MySQL. I looked at several other posts about the "lost connections" issue, but then I looked at: http://dev.mysql.com/doc/refman/5.0/en/gone-away.html and found this: "You can also get these errors if you send a query to the server that is incorrect or too large. If mysqld receives a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection. If you need big queries (for example, if you are working with big BLOB columns), you can increase the query limit by setting the server''s max_allowed_packet variable, which has a default value of 1MB. You may also need to increase the maximum packet size on the client end. More information on setting the packet size is given in Section B.2.9, “Packet too large”. " Has anyone seen a correlation between using the DB to store session data and losing connections on MySQL? Thanks, Wes -- 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 -~----------~----~----~----~------~----~------~--~---
Wes Gamble
2007-Jan-10 22:35 UTC
Re: MySQL lost connection errors - related to DB session sto
Given the above and http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html, how would I set the "max_allowed_packet" on the client side of the MySQL connection - I assume in the MySQL connection adapter? Wes -- 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 -~----------~----~----~----~------~----~------~--~---
Benoit B.
2007-Jan-11 02:11 UTC
Re: MySQL lost connection errors - related to DB session sto
Simply use the native win32 mySQL driver (It is available as a gem). The ruby one got issues with win32. The pb is very random. You can have everything working fine for a while, then suddenly got the connection lost errors. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
jjathman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jan-11 02:33 UTC
Re: MySQL lost connection errors - related to DB session sto
I agree with Benoit, you definitely need to install the native mysql driver. Just do: gem install mysql and then pick the driver for win32, it will resolve your problems. Joe On Jan 10, 8:11 pm, "Benoit B." <benoit.benez...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Simply use the native win32 mySQL driver (It is available as a gem). > The ruby one got issues with win32. > The pb is very random. You can have everything working fine for a > while, then suddenly got the connection lost errors.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Wes Gamble
2007-Jan-11 04:52 UTC
Re: MySQL lost connection errors - related to DB session sto
jjathman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> I agree with Benoit, you definitely need to install the native mysql > driver. Just do: > gem install mysql > > and then pick the driver for win32, it will resolve your problems. > > JoeI have been running this app. against MySQL on Win XP for 5 months and have never seen this problem before. I''ll install the gem but I''m skeptical. I don''t have to do anything with the AR connectors? Thanks, Wes -- 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 -~----------~----~----~----~------~----~------~--~---
Wes Gamble
2007-Jan-11 05:00 UTC
Re: MySQL lost connection errors - related to DB session sto
I did gem install mysql and got version 2.7.3. Then when I restart Mongrel, I got this error: "The procedure entry point mysql_stmt_row_tell could not be located in the dynamic link library LIBMYSQL.dll." Did I miss something? Wes -- 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 -~----------~----~----~----~------~----~------~--~---
Wes Gamble
2007-Jan-11 07:16 UTC
Re: MySQL lost connection errors - related to DB session sto
Based slightly on http://dev.mysql.com/doc/refman/5.0/en/gone-away.html, you need to: 1) gem install mysql (I installed 2.7.3 for win32) 2) Add the directory that contains libmySQL.dll to your PATH (probably C:\Program Files\MySQL\MySQL Server 5.0\bin) 3) If you are running your Rails app inside of a container such as RadRails :), make sure you restart your app container. NOTE: Alternatively you could move the libmySQL.dll file to a directory in your PATH like C:\ruby but this is unwise as you could re-break things when you upgrade your Ruby installation). Things seem to be much better now. Wes -- 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 -~----------~----~----~----~------~----~------~--~---