httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Noordhuis" <bnoordh...@gmail.com>
Subject Re: mod_authn_dbd - internal server error after certain idle time
Date Sat, 07 Jul 2007 10:50:05 GMT
On 7/7/07, Ben Noordhuis <bnoordhuis@gmail.com> wrote:
> I'm not aware of a reliable workaround for earlier versions of
> MySQL, unfortunately.

Allow me to reply to myself. If you can live with a slight performance
impact, the code snippet below should help you to reconnect in a
controlled fashion. Hope this helps.

switch (mysql_query(&mysql, "SELECT 1")) {
case 0:
    mysql_free_result(mysql_use_result(&mysql));
    break;
case CR_SERVER_GONE_ERROR:
    /* reinitialize */
    break;
default:
    /* handle error */
}

Mime
View raw message