Joe Cairns wrote:> I am getting the following error when running my app on the server: > mysql::Error: Lost connection to MySQL server during query: <some SQL > here> > > The SQL is usually a SHOW FIELDS statement, but after scouring the log > files I see that it occassionally happens with other queries as well. > > I did a little research, and one topic I found suggested that I edit the > /etc/mysql/my.cnf and increase the timeout period. I checked and I am > using the default timeout which is probably too long. > > This problem seemed to start happening when I started storing my > sessions in a table, but I can pin it down to exactly that. > > Anyone have any ideas? I''m completely stumped on this one.Ok it seems to be the sessions. I commented this line out from the environment.rb: config.action_controller.session_store = :active_record_store Once I did that the database errors halted immediately. The machine is a P4 2.8, with 1gb ram, and I was the only one using the boxs so I doubt it would be load. This sounds like my set up between ruby and mysql needs some tweaking. Not being a ruby, mysql, or linux expert I''m not sure exactly what to tweak. Anyone have any useful places to start looking? -- Posted via http://www.ruby-forum.com/.
Joe, I had the same problem. The problem was with different versions of MySQL+Ruby. I compile mysql.so for mysql4.1 on winXP and than it worked. See if you have latest versions for both ruby and mmysql. -- Posted via http://www.ruby-forum.com/.
I am getting the following error when running my app on the server: mysql::Error: Lost connection to MySQL server during query: <some SQL here> The SQL is usually a SHOW FIELDS statement, but after scouring the log files I see that it occassionally happens with other queries as well. I did a little research, and one topic I found suggested that I edit the /etc/mysql/my.cnf and increase the timeout period. I checked and I am using the default timeout which is probably too long. This problem seemed to start happening when I started storing my sessions in a table, but I can pin it down to exactly that. Anyone have any ideas? I''m completely stumped on this one. -- Posted via http://www.ruby-forum.com/.
Ruby Rails wrote:> Joe, > I had the same problem. The problem was with different versions of > MySQL+Ruby. I compile mysql.so for mysql4.1 on winXP and than it worked. > See if you have latest versions for both ruby and mmysql.Hi thanks for the advice! I looked deeply into what version of mysql I had running and it was the relatively ancient 4.0.24 which is what is what debian has as their stable package. My bad for not checking from the get-go. I''ll get the latest mysql source tonight and do a compile and install of that. Had to do the same thing for ruby 1.8.4 as the stable debian package only was up to 1.8.2 Those deb packagers are not a particularly fast moving lot are they? -- Posted via http://www.ruby-forum.com/.
Hi, Another option is to install InstantRails. This includes recent installs of MySQL (Not 5 though) and Appache and the whole package installs and runs in about 5 minutes on a standard WinXP machine. The out of the box sample applications rely on the Root user on MySQL to have no password which is the MySQL installation by default. As a result there are a couple of extra steps to secure MySQL but they do run out of the box which is really cool. Mat> Ruby Rails wrote: >> Joe, >> I had the same problem. The problem was with different versions of >> MySQL+Ruby. I compile mysql.so for mysql4.1 on winXP and than it worked. >> See if you have latest versions for both ruby and mmysql. > > Hi thanks for the advice! I looked deeply into what version of mysql I > had running and it was the relatively ancient 4.0.24 which is what is > what debian has as their stable package. > > My bad for not checking from the get-go. I''ll get the latest mysql > source tonight and do a compile and install of that. Had to do the > same thing for ruby 1.8.4 as the stable debian package only was up to > 1.8.2 > > > Those deb packagers are not a particularly fast moving lot are they? > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
I''m using InstantRails and I''m seeing the same recurring MySQL error. I''ve just switched off saving the sessions in the database to see if that helps. ----- Original Message ----- From: <mat@pobblebonk.net> To: <rails@lists.rubyonrails.org> Sent: Wednesday, July 12, 2006 11:30 PM Subject: Re: [Rails] Re: Recurring mySQL Error> Hi, > Another option is to install InstantRails. This includes recent > installs of MySQL (Not 5 though) and Appache and the whole package > installs and runs in about 5 minutes on a standard WinXP machine. > > The out of the box sample applications rely on the Root user on MySQL > to have no password which is the MySQL installation by default. As a > result there are a couple of extra steps to secure MySQL but they do > run out of the box which is really cool. > > Mat > >> Ruby Rails wrote: >>> Joe, >>> I had the same problem. The problem was with different versions of >>> MySQL+Ruby. I compile mysql.so for mysql4.1 on winXP and than it worked. >>> See if you have latest versions for both ruby and mmysql. >> >> Hi thanks for the advice! I looked deeply into what version of mysql I >> had running and it was the relatively ancient 4.0.24 which is what is >> what debian has as their stable package. >> >> My bad for not checking from the get-go. I''ll get the latest mysql >> source tonight and do a compile and install of that. Had to do the >> same thing for ruby 1.8.4 as the stable debian package only was up to >> 1.8.2 >> >> >> Those deb packagers are not a particularly fast moving lot are they? >> >> >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
The same thing happens to me, and later when i have install on my other windows box and a mac, never happened again. Ruby Rails wrote:> Joe, > I had the same problem. The problem was with different versions of > MySQL+Ruby. I compile mysql.so for mysql4.1 on winXP and than it worked. > See if you have latest versions for both ruby and mmysql.-- Posted via http://www.ruby-forum.com/.
On 7/12/06, Joe Cairns <joe.cairns@gmail.com> wrote:> > I am getting the following error when running my app on the server: > mysql::Error: Lost connection to MySQL server during query: <some SQL > here> > > The SQL is usually a SHOW FIELDS statement, but after scouring the log > files I see that it occassionally happens with other queries as well. > > I did a little research, and one topic I found suggested that I edit the > /etc/mysql/my.cnf and increase the timeout period. I checked and I am > using the default timeout which is probably too long. > > This problem seemed to start happening when I started storing my > sessions in a table, but I can pin it down to exactly that. > > Anyone have any ideas? I''m completely stumped on this one.This is a known problem with the pure Ruby MySQL driver. The solution is to use the C-based MySQL driver instead. Unfortunately, at the time of the last Instant Rails release, the C-based driver was crashing with segfaults so we had to back out to the native Ruby driver. The good news is that the bugs in the C-based driver have been fixed. This will be included in the next release od Instant Rails. You can install it yourself in the meantime: http://www.vandomburg.net/pages/mysql-ruby-windows Please let me know if this fixes you problem. Curt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060713/c566f73e/attachment.html
Joe - I would like to know if this fixed your problems. I''m having the same problem! Thanks, Ben Lisbakken On Jul 13, 2006, at 4:07 AM, Curt Hibbs wrote:> On 7/12/06, Joe Cairns <joe.cairns@gmail.com> wrote: > I am getting the following error when running my app on the server: > mysql::Error: Lost connection to MySQL server during query: <some SQL > here> > > The SQL is usually a SHOW FIELDS statement, but after scouring the log > files I see that it occassionally happens with other queries as well. > > I did a little research, and one topic I found suggested that I > edit the > /etc/mysql/my.cnf and increase the timeout period. I checked and I am > using the default timeout which is probably too long. > > This problem seemed to start happening when I started storing my > sessions in a table, but I can pin it down to exactly that. > > Anyone have any ideas? I''m completely stumped on this one. > > This is a known problem with the pure Ruby MySQL driver. The > solution is to use the C-based MySQL driver instead. Unfortunately, > at the time of the last Instant Rails release, the C-based driver > was crashing with segfaults so we had to back out to the native > Ruby driver. > > The good news is that the bugs in the C-based driver have been > fixed. This will be included in the next release od Instant Rails. > You can install it yourself in the meantime: > > http://www.vandomburg.net/pages/mysql-ruby-windows > > Please let me know if this fixes you problem. > > Curt > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060725/fc593b6a/attachment-0001.html
Ben Lisbakken wrote:> Joe - I would like to know if this fixed your problems. I''m having > the same problem! > > Thanks, > Ben LisbakkenHi Ben: Upgrading seemed to take care of the problem, I''m running mysql 5.0.x and ruby 1.8.4 and I haven''t seen the error since. -- Posted via http://www.ruby-forum.com/.
On Thu, 2006-07-13 at 06:07 -0500, Curt Hibbs wrote:> On 7/12/06, Joe Cairns <joe.cairns@gmail.com> wrote: > I am getting the following error when running my app on the > server: > mysql::Error: Lost connection to MySQL server during query: > <some SQL > here> > > The SQL is usually a SHOW FIELDS statement, but after scouring > the log > files I see that it occassionally happens with other queries > as well. > > I did a little research, and one topic I found suggested that > I edit the > /etc/mysql/my.cnf and increase the timeout period. I checked > and I am > using the default timeout which is probably too long. > > This problem seemed to start happening when I started storing > my > sessions in a table, but I can pin it down to exactly that. > > Anyone have any ideas? I''m completely stumped on this one. > > This is a known problem with the pure Ruby MySQL driver. The solution > is to use the C-based MySQL driver instead. Unfortunately, at the time > of the last Instant Rails release, the C-based driver was crashing > with segfaults so we had to back out to the native Ruby driver. > > The good news is that the bugs in the C-based driver have been fixed. > This will be included in the next release od Instant Rails. You can > install it yourself in the meantime: > > http://www.vandomburg.net/pages/mysql-ruby-windows > >This also happens when you try to connect to a mysql 4.x server that is using the old password format, which I ran into eariler this week: