[jifty-devel] Jifty server stuck

Andrew Hanenkamp sterling at hanenkamp.com
Wed Jan 16 09:42:32 EST 2008


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.

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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20080116/06ad3461/attachment-0001.htm


More information about the jifty-devel mailing list