Jeremy Shoemaker
2006-Jun-05 15:42 UTC
[Rails] Intermitent ''lost connection to mysql'' error
Hi, I''ve been looking at Ruby on Rails for an in-house project where I work. After I got everything setup correctly (apache, fcgi, mysql, etc) I''ve started to run into "lost connection to mysql" errors. I googled to try and find a solution, but most of the problems people seem to be having are constant and simple to fix. I haven''t found anyone talking about intermitent problems. Most of the time, the queries go through without a hitch, and then suddenly, I get the error page saying it lost connection. If anyone can help, I''d appreciate it. I can post the exact error message if need be, but I wasn''t gonna send them if I don''t have to. For the record, we''re using: Apache 2.0.58 MySql 4.1.14 Ruby 1.8.4 Rails 1.1.2 Thanks, Jeremy Shoemaker -- Posted via http://www.ruby-forum.com/.
Greetings Jeremy, I''d start searching on the wiki, for instance: http://wiki.rubyonrails.org/rails/pages/Mysql+Connection +Problems Plus you''ll find os specific solutions on the ''pages'' page. I get the feeling you''re on windows? If so, I''ve found the following to be necessary to achieve stability. http://www.vandomburg.net/pages/mysql-ruby-windows Jodi On 5-Jun-06, at 11:42 AM, Jeremy Shoemaker wrote:> Hi, > I''ve been looking at Ruby on Rails for an in-house project where I > work. After I got everything setup correctly (apache, fcgi, mysql, > etc) > I''ve started to run into "lost connection to mysql" errors. I googled > to try and find a solution, but most of the problems people seem to be > having are constant and simple to fix. I haven''t found anyone talking > about intermitent problems. Most of the time, the queries go through > without a hitch, and then suddenly, I get the error page saying it > lost > connection. > If anyone can help, I''d appreciate it. I can post the exact error > message if need be, but I wasn''t gonna send them if I don''t have to. > For the record, we''re using: > Apache 2.0.58 > MySql 4.1.14 > Ruby 1.8.4 > Rails 1.1.2 > > Thanks, > Jeremy Shoemaker > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Jeremy Shoemaker
2006-Jun-05 16:56 UTC
[Rails] Re: Intermitent ''lost connection to mysql'' error
Actually, its not running on Windows. I knew I forgot to mention something. Its running on Solaris 9. Also, I tried most of the stuff on that first page. I think I might know what the problem is though. I''ll post again if I get any results. -- Posted via http://www.ruby-forum.com/.
Jeremy Shoemaker
2006-Jun-05 21:37 UTC
[Rails] Re: Intermitent ''lost connection to mysql'' error
Ok, I noticed I don''t actually have mysql-ruby installed. But I''m having issues getting it to install, either from ruby gems or from source. And what really makes no sense is the fact that for all intents and purposes, it works without it. I can get it to serve pages from the application, but after about the 10th request, it dies with the "lost connection" message. And if you try again, it usually works fine. Anyone else ever have anything like this going on? -- Posted via http://www.ruby-forum.com/.
Justin Forder
2006-Jun-09 13:22 UTC
[Rails] Re: Intermitent ''lost connection to mysql'' error
Jeremy Shoemaker wrote:> Ok, I noticed I don''t actually have mysql-ruby installed. But I''m > having issues getting it to install, either from ruby gems or from > source. And what really makes no sense is the fact that for all intents > and purposes, it works without it. I can get it to serve pages from the > application, but after about the 10th request, it dies with the "lost > connection" message. And if you try again, it usually works fine.Rails includes its own copy of a patched version of the pure ruby MySQL driver, to fall back on if no other MySQL driver is installed. That one is obviously not working reliably for you; I can only suggest that you keep trying to get a non-Rails driver installed. regards Justin