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 -~----------~----~----~----~------~----~------~--~---
