On Tue, 3 Sep 2002 10:36:30 -0700 (PDT)
"Anthony E." <[EMAIL PROTECTED]> wrote:

> 
> --- Enrico Sorcinelli <[EMAIL PROTECTED]>
> wrote:
> > On Tue, 3 Sep 2002 09:05:45 -0700 (PDT)
> > "Anthony E." <[EMAIL PROTECTED]> 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! ;-)

Reply via email to