Thanks for taking the time on this Michael.

On 28 Oct 2008, at 17:32, Michael Klishin wrote:
> 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.

You're right restarting the DB is unlikely to happen very often for  
the majority of apps, so that issue is of less consequence

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

The overhead to every request was one thing I was worried about, and  
especially as the problem is specific to AR and MySQL I think. I  
suppose it could be useful to have a merb_activerecord_mysql_keepalive  
plugin or something.

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

I think perhaps my patch has diverted from the issue that there is  
currently a thread that should verify connections every hour, but that  
isn't working as intended.

Nick Dufresne has suggested a fix by moving the thread into  
Merb::BootLoader.after_app_loads.

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

Reply via email to