httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Donovan <>
Subject Re: mod_authn_dbd - internal server error after certain idle time
Date Fri, 06 Jul 2007 19:58:35 GMT
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?

It looks like a higher priority is given to DBDKeep and DBDMin than to 
expiring old connections.  This would mean that 2 connections could be 
retained past their deadline to ensure that DBDKeep connections remain 

ref: apr-util/misc/apr_reslist.c:169  function:  reslist_maint()
in Apache 2.2.4 / APR 1.2.8

Perhaps setting both DBDKeep and DBDMin to zero would let all the 
connections expire when they are idle for 60 seconds.

DBDKeep is required to be >= DBDMin.


View raw message