2008/10/28 Steve Tooke <[EMAIL PROTECTED]>:
> The problem also seems to occur if the MySQL server is restarted.
> ActiveRecord holds on to the connection, and unless you check its
> still valid it tries to use it, without retrying. So increasing the
> wait_timeout variable or pinging MySQL every once in a while wouldn't
> help with this.

I am by no means a deployment expert but usually DB restart is
something that is quite special,
and servers cluster restart is not (god or monit do if for you as soon
as the app hits memory limit, and a few people are worried about it).
So doing a cluster restart is acceptable for simple applications that
only use
one DB and need no really high availability. This helps with
disconnection issue.

Adding an overhead to literally every request is something I'd rather
avoid in the framework. If it's the way you choose,
you can make a plugin out of this patch since it uses public Merb API
(just one hook), so you can keep it around and add it to several
applications.

I'd rather go with a thread that wakes up every 5 minutes or so to
ping MySQL server.
-- 
MK

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

Reply via email to