Ooh this is fun times. I think this usually happens when you don't have the ruby-mysql bindings in place... but it's also something to do with versions sometimes, and also something to do with the mysql socket symlink or something.
Was that vague enough for you? ;-) Google it, because I know one of my workmates had the same issue and got around it with something he found from googling it on the front page of the results. Regards, Julian. On 28/10/2008, at 9:00 PM, Steve Tooke wrote: > > I'm hoping to generate a bit of discussion about this ticket: > http://merb.lighthouseapp.com/projects/7588/tickets/184-merb_activerecord-does-not-verify-active-connections > > I've been seeing a problem with ActiveRecord connections to MySQL > becoming stale when there is no activity for a while, and reporting > the error message: > > Mysql::Error: MySQL server has gone away > > The Mysql server is still running but the ActiveRecord connection > seems to have timed out. > > Merb::Orms::ActiveRecord#connect seems to have a keep-alive line in it > > http://github.com/wycats/merb-plugins/tree/master/merb_activerecord/lib/merb/orms/active_record/connection.rb#L61 > > Thread > .new > { loop > { sleep(60*60); ::ActiveRecord::Base.verify_active_connections! } } > > But this doesn't appear to be working properly. > > Nick's LH ticket seems to demonstrate that the way the keep alive > thread is started, the active connections are not available, so they > can't be kept alive? > > Does anybody have any idea why this might be happening, what we can do > to fix it, and how we an spec it to stop it creeping back in? > > Cheers, > Steve > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
