[jifty-devel] Jifty server stuck

Jesse Vincent jesse at bestpractical.com
Tue Jan 22 10:31:25 EST 2008




On Wed, Jan 16, 2008 at 08:42:32AM -0600, Andrew Hanenkamp wrote:
> I have seen this white screen of death before too on production servers. The
> problem I found was that MySQL was dropping the client connection and Jifty
> does not on each request perform ping-and-reconnect yet. I haven't hacked it
> in because I wasn't sure what the best place to do it in the core would be.
> 
> However, the work around is very simple. At the very top of your dispatcher
> add:
> 
> before '**' => run { Jifty->handle->connect };
> 
> That will not reconnect if the current connection is still up and running,
> but it will ping the database connection to check for liveness. If it fails
> the liveness test, it will reconnect.
> 
> That's resolved the problem on my servers. I hope that helps.


It _should_ be possible to sink that down into Jifty::DBI, possibly down
as far as ::Handle->simple_query. (Say, trap a failure and retry if you
get a not-connected error?) That way you don't get the overhead of a
ping before each statement.

-j


> 
> Cheers,
> Andrew
> 
> On 1/16/08, Stanislav Sinyagin <ssinyagin at yahoo.com> wrote:
> >
> > I've let my application run in native jifty server running overnight, and
> > in the morning all web output was empty:
> >
> > the server responded, and it rendered everything from my mason templates,
> > but it looked like the database was completely empty. After restarting
> > jifty server it worked fine again.
> >
> > That time I started it with >/dev/null, with optimistic thought
> > that I wouldn't need it :-)
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > jifty-devel mailing list
> > jifty-devel at lists.jifty.org
> > http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
> >

> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel


-- 


More information about the jifty-devel mailing list