Forum OpenACS Development: Re: Proposed correction to DB Pools settings in OpenACS default config.tcl
The 2nd source, the config-reference.tcl.txt is not complete and does not tell what happens in the 0 case (or negative case). Not sure, where you are reading "0 causes connections to close immediately their initial purpose has been fulfilled" ... whatever this might mean.
If aolserver would close after every db-query the connection, it would be horrible for our setup. In our production environment, we have 90 connection threads and 150 db-connections, every day typically 1000 concurrent users, ... and we are using 0 for both values.
Anyhow, you don't have to believe me, the authoritative source is the code:
if ((handlePtr->poolPtr->maxidle && handlePtr->atime < minAccess) ||see on
(handlePtr->poolPtr->maxopen && (handlePtr->otime < minOpen)) ||
(handlePtr->stale == NS_TRUE) ||
if maxidle or maxopen are 0, the timeouts do not apply, no close happens for that reason....
Be assured that I didn't doubt your assertion for a second, particularly since I know you are part of the core team for Aolserver! I merely wanted to flag up the source of my misinterpretation to establish whether or not the docs needed to be updated or clarified.
The source of the confusion was that I understood the word 'stale' to mean something other than closed (hung process or something!).
I also assumed, in the absence of specific detail about the 0 case, that this would mean zero seconds as a timeout, leading to a connection being stale after 0 seconds.
The code is crystal clear, thanks.