On Tue, 23 Jul 2002 18:58:14 +1000
Mark Ridgway <[EMAIL PROTECTED]> wrote:

> Hi All,
> 
> We're running Mason 1.04 (Apache/1.3.22 (Solaris) mod_perl/1.26
> mod_ssl/2.8.5 OpenSSL/0.9.6b) which connects to a number of Oracle
> databases, so we are using Apache::DBI for connection pooling.
> 
> As we understand it, each process has its own connection pool that
> lasts for the life of that process (i.e. each child collects its own
> set of DB handles until it dies).
> 
> Whilst this is normally not an issue, when we experience network
> problems, the number of available connections on some crucial databases
> can quickly run out, which many open connections sitting idle in the
> pool of various clients using other DBs, etc.
> 
> What we'd like to do is send some kind of "quit" signal to the process
> so that it finishes that transaction and dies, instead of waiting until
> MaxRequestsPerChild.  This will ensure that DB handles for this
> particular DB will not be idly pooled, but instead constantly in use.
> 
> Is there a command to do this? (e.g. like 'abort', but one that
> completes the transaction successfully, and kills the child process).
> (e.g. $r->die() :-)
> 
> Also, does anyone know how to get the current "RequestsPerChild"
> counter (that MaxRequestsPerChild evaluates against)?
> 

> 


Hi Mark,
if you don't need persistent connections for all Oracle DBs
you can try to use some nonpersistent connections by setting
'dbi_connect_method' property to 'connect' in DBI connect
hash options:

  my $dbh = DBI->connect('dbi:...',... ,{'dbi_connect_method' => 'connect'});

However I think that the right solution is a connection pool server 
like SQLRealy (it work very well with Oracle, MySQL, PostgresSQL, DB2, etc)

Bye

        Enrico

=========================================================
Enrico Sorcinelli - Gruppo E-Comm - Italia On Line S.p.a.
E-Mail: [EMAIL PROTECTED] - [EMAIL PROTECTED]
=========================================================

Reply via email to