Re: DBI persistence problem

[prev] [thread] [next] [Date index for 2004/12/01]

From: Malcolm J Harwood
Subject: Re: DBI persistence problem
Date: 23:10 on 01 Dec 2004
On Wednesday 1 December 2004 08:26 pm, Richard N. Fogle wrote:

> 1.  We disabled Apache::DBI - the server can generate thousands of
> queries per second and this feature literally made the CPU catch fire.

Odd. Normally (in my limited experience) it has the reverse effect as you 
aren't creating and destroying a connection every time.

> 3.  We have a disconnect at the end of each perl CGI.  Not sure if it is
> being reached, see no plausible reason why it shouldn't - the code isn't
> that complex.

Worth checking anyway.

> 4.  This is what we have in httpd.conf:
> SetHandler perl-script
> PerlHandler Apache::Registry

Registry will keep any globals around, so if $dbh is global it wont destroy it 
(though if disconnect is being called, it should disconnect it).

> 5.  We easily reach 1024 webserver processes, apache 1.3.

If each one is connecting to the db server (assuming you don't have any 
interprocess connection pooling), then that's your 1024+ db connections right 
there. If the connections are made but not disconnected until the end of the 
script, you would (I think) see a lot of "idle" connections that don't have 
an active query (it's already completed) because they haven't reached the end 
of the script and been disconnected yet.


        -- 
        I always wanted to be somebody, but I should have been more specific.
- Lily Tomlin

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

DBI persistence problem
Richard N. Fogle 01:00 on 02 Dec 2004

Re: DBI persistence problem
Malcolm J Harwood 22:36 on 01 Dec 2004

Re: DBI persistence problem
Perrin Harkins 22:39 on 01 Dec 2004

Re: DBI persistence problem
Richard N. Fogle 01:26 on 02 Dec 2004

Re: DBI persistence problem
Malcolm J Harwood 23:10 on 01 Dec 2004

Re: DBI persistence problem
Richard N. Fogle 23:48 on 01 Dec 2004

Re: DBI persistence problem
Perrin Harkins 19:16 on 02 Dec 2004

Re: DBI persistence problem
Rob Mueller 19:46 on 02 Dec 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52