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
on 2006-06-05 17:42
on 2006-06-05 17:52
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 2006-06-05 18:56
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.
on 2006-06-05 23:37
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?
on 2006-06-09 15:24
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