perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: Apache::DBI
Date Wed, 03 May 2000 15:29:27 GMT
On Wed, 3 May 2000, Jim Serio wrote:

> I'm not sure if this is even a problem but it's always
> been on my mind. I use Apache::DBI and I have a general
> module that handles db connections for my scripts. Here's
> the relevant portion:
> my $DBH ||= DBI->connect("...")
> It basically accepts a hash ref to the dbconfig and opens
> a connection. My httpd.conf is set with 5 spare clients
> MIN and 10 MAX.
> I'm the only one using this module right now and starting
> httpd fresh results in no conections. Running my test CGI
> script once results in two (2) mysql connections. Running
> it again, results in four (4) connections. This will 
> eventually continue until the number of mysql connections
> is always four (4) more than httpd processes.
> The thing that I can't figure out is that my scripts
> properly open and close the db connection, so why doesn't
> Apache::DBI re-use the original connection? Why spawn
> one more each time?
> I've checked the FAQ and searched the archives and found
> no info (other than someone else asking this same question
> last year with no helpful answer) and the Apache:DBI man
> page doesn't touch on this.

Are you sure it's not:
Opening connections with different parameters

Stas Bekman             | JAm_pH    --    Just Another mod_perl Hacker      | mod_perl Guide  ||

View raw message