On occasion, my local Rails app loses its connection to MySQL. I get some error that the connection failed, but if I just refresh the page, it works fine. This has never happpened in my STAGE or PROD environments (I deploy to Ubuntu), so it has not been that big a deal.
Does this happen to anybody else? Is there something I can do to fix it? Is it MySQL or Ruby?
views:
143answers:
2
+3
A:
Look like the best solution to this is to install the platform specific mysql driver. sudo gem install mysql
Matt Brown
2008-10-13 12:46:52
+1
A:
I remember having this problem a while back (before i upgraded to Leopard?). They're tricky to diagnose, but have a look at logfiles, and try setting "wait_timeout" longer (you shouldn't have to mess with "max_connections". See:
http://www.mysqlperformanceblog.com/2008/08/23/how-to-track-down-the-source-of-aborted_connects/
http://dev.mysql.com/doc/refman/5.0/en/communication-errors.html
I think i followed Dan Benjamin's MySql install blog to not have problems:
Gene T
2008-10-13 14:34:01