I think you can use the scheduler built into turbogears to do a DB
lookup every few min. to keep the database alive.

On 2/3/07, iain duncan <[EMAIL PROTECTED]> wrote:
>
> On Sun, 2007-04-02 at 12:21 +1100, Glenn Davy wrote:
> >
> > > The sleep issue is that when tg runs with cherrypy, it's in a
> > > long-running process that keeps a mysql connection alive. But if mysql
> > > doesn't receive a hit on that connection in a long time, it goes to
> > > sleep and then the first hit fails. Which is Really Annoying. So the
> > > workaround is to have something make a hit every hour. Which is Really
> > > Ugly. ; )
> > >
> > yes - that is very ugly -  I gave up on mysql with TG, at least for SO
> > due to unicode issues - (no great loss as postgres is by far my
> > 'sentimental' favourite) but 80% of my paid work atm is ruby on rails +
> > mysql, so while ive experienced no issues I thought id better  check -
> > apparently mongrel has a timeout value, which if lower than that of the
> > mysql connection will 'revive' the connection before it 'goes stale' -
> > perhaps cherrypy can be extended to have something similar to  this
> > added, given lack of response from mysql people?
>
> Maybe it does and I don't know about it? CherryPy gurus?
>
> I have every intention of learning Postgresql, but I also have a bad
> habit of trying to pick up too many new things at once and digging
> myself into a whole of stress and caffeine ...
>
> Iain
>
>
> >
>


-- 
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to