Return-Path: Delivered-To: apmail-modperl-archive@apache.org Received: (qmail 66599 invoked by uid 500); 4 Sep 2002 08:39:09 -0000 Mailing-List: contact modperl-help@apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 66584 invoked from network); 4 Sep 2002 08:39:08 -0000 Date: Wed, 4 Sep 2002 10:50:11 +0200 From: Enrico Sorcinelli To: "Anthony E." Cc: modperl@perl.apache.org Subject: Re: Apache::DBI new connects in error_log... Message-Id: <20020904105011.721a0137.e.sorcinelli@pisa.iol.it> In-Reply-To: <20020903173630.36328.qmail@web14502.mail.yahoo.com> References: <20020903193627.5ef8d231.e.sorcinelli@pisa.iol.it> <20020903173630.36328.qmail@web14502.mail.yahoo.com> Organization: Italia OnLine S.p.A. X-Mailer: Sylpheed version 0.8.1 (GTK+ 1.2.6; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Tue, 3 Sep 2002 10:36:30 -0700 (PDT) "Anthony E." wrote: > > --- Enrico Sorcinelli > wrote: > > On Tue, 3 Sep 2002 09:05:45 -0700 (PDT) > > "Anthony E." wrote: > > > > > Hello, > > > > > > I'm getting an awful lot of these error statements in > > > my error_log file for apache: > > > > > > -- > > > 25935 Apache::DBI new connect to > > > 'db:1.2.3.4UserPassAutoCommit=1PrintError=1' > > > -- > > > > > > It looks like they are happening for every database > > > connection, like the db connections are not staying > > > persistent. I'm using Apache::DBI in my startup.pl > > > script under mod_perl. Also the web server has been > > > crashing every 10 minutes, when the server load gets > > > up to about 105. > > > > > > any ideas? > > > > > > > There are some additional informations that you > > should supply > > in order to help you, like > > > > - Are connections per-user? > How to i tell? Hi Anthony, Apache::DBI caches connection based on his args (dbd driver, user, password...) and attributes. So, if your application uses a different user and/or attributes to connect to (a different?) database, every connection will be cached. Also, every child could have these cached DB's handles. Apache::DBI works very well for web applications that uses same DB user. > > - Have you loaded Apache::DBI before DBI or before > > any module that load it? > Yes, in startup.pl. > This doesn't assure that you have loaded it before! For instance if you have in your httpd.conf: PerlModule DBI (or any module that uses it) before PerlRequire /path/to/startup.pl or load DBI (or any module that uses it) before Apache::DBI in your startup.pl script. > > - How many childs? (with Apache::DBI 1 child = 1 > > connection) > How to i tell? On Unix/Linux you can do this: ps -A | grep -c httpd Bye - Enrico [OT]: The 2.11-13 paragraphs of "mod_perl developers cookbook" are a good recipe! (if you are a mod_perl developer you must to have it! ;-)