Forum: Ruby on Rails Intermitent 'lost connection to mysql' error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
10d6b42bbb9e622a819c7b0025de57d3?d=identicon&s=25 Jeremy Shoemaker (Guest)
on 2006-06-05 17:42
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
B09a3f6cdc4797532647d2d264b5df49?d=identicon&s=25 Jodi Showers (jshow)
on 2006-06-05 17:52
(Received via mailing list)
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
10d6b42bbb9e622a819c7b0025de57d3?d=identicon&s=25 Jeremy Shoemaker (Guest)
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.
10d6b42bbb9e622a819c7b0025de57d3?d=identicon&s=25 Jeremy Shoemaker (Guest)
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?
Eea7ad39737b0dbf3de38874e0a6c7d8?d=identicon&s=25 Justin Forder (Guest)
on 2006-06-09 15:24
(Received via mailing list)
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
This topic is locked and can not be replied to.