httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Kent <m...@bravenet.com>
Subject Re: mod_authn_dbd - internal server error after certain idle time
Date Fri, 06 Jul 2007 20:13:03 GMT
On Fri, 2007-06-07 at 15:54 -0400, Danie Qian wrote:
> ----- Original Message ----- 
> From: "Matthew Kent" <matt@bravenet.com>
> To: <modules-dev@httpd.apache.org>
> Sent: Friday, July 06, 2007 3:18 PM
> Subject: Re: mod_authn_dbd - internal server error after certain idle time
> 
> 
> > On Fri, 2007-06-07 at 15:07 -0400, Danie Qian wrote:
> >> I am using mod_authn_dbd and mod_dbd to do authentication again a mysql
> >> database. Basically it works but after sometime I will get a internal 
> >> server
> >> error. I checked the log this happens at apr_dbd_pvselect() line in
> >> mod_authn_dbd.c. So this looks like to me that apr_dbd_pvselect() is 
> >> trying
> >> to re-use a connection that is closed by the mysql server side whose
> >> wait-timeout is set to 1200 seconds. my mod_dbd setting is this
> >> DBDMin  1
> >> DBDKeep 2
> >> DBDMax  50
> >> DBDExptime 60
> >> My question is why the keepalive setting for 60sec doesnt work for me? 
> >> How
> >> do I fix this without changing the timeout setting on the mysql server?
> >>
> >>
> >
> > I've haven't used mod_authn_dbd yet but this sounds similar to issues I
> > was having
> >
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=39329
> >
> > patch hasn't made its way into apr_dbd_mysql.c yet. Please add a note if
> > the it fixes your issue.
> >
> >> Thanks,
> >> Daniel
> >>
> > -- 
> > Matthew Kent \ SA \ bravenet.com
> >
> >
> 
> I am using apache-2.2.4 configured with apr-1.2.9 and apr-1.2.8. I have the 
> above mentioned problem even after I replaced mod_dbd.c with the one from 
> yesterday's snapshot. Do you think this patch will still apply?
> 
> 

Well the patch is against apr_dbd_mysql.c (in apr-util) not mod_dbd.c
(in httpd) so I think it would apply in this case.

Incidentally here's my httpd.conf ifmodule block. I've been using
mod_dbd + apr-util with apr_dbd_mysql and the linked patch in production
since it came out without issue.

<IfModule mod_dbd.c>
    DBDriver mysql
    # persistant connections
    DBDPersist On
    # mod_dbd is still very fragile, may segfault with wrong connection
    # params
    # XXX: double check this claim
    <IfDefine isstaging>
        DBDParams host=x,user=x,pass=x,dbname=x,port=3306
    </IfDefine>
    <IfDefine isproduction>
        DBDParams host=x,user=x,pass=x,dbname=x,port=3306
    </IfDefine>
    # this is one connection PER httpd thread, no need to be more than 
    # 1 unless we have multiple modules using mod_dbd
    DBDMin 1
    DBDMax 1
    DBDKeep 1
    DBDExptime 600
</IfModule>

Oh and apr-util was compiled against mysql 5.0.27. The MySQL server has
a wait_timeout of 600 seconds.
-- 
Matthew Kent \ SA \ bravenet.com


Mime
View raw message