Hello folks,

=20

I have some problems with Apache::DBI using multiples databases. hope =
some
of you can help because I tried everything I could.

=20

I have a web application using 3 different databases: A 'master' =
database, a
'client' database and an 'archives' database.

=20

I have Apache::DBI configured and it work very well with the FIRST =
database
(master), which get recycled like it should. However the client and =
archives
databases don't get recycled at all and Apache::DBI create a new =
connection
every time.

=20

Here a sample of my error_log with $Apache::DBI::DEBUG =3D 2:

=20

(I sanitized the hostname, username, password for obvious reason, but =
they
are all the same)

=20

<-- snip -->

[Tue Oct  5 14:28:24 2004] [notice] Apache/1.3.29 (Unix) mod_perl/1.29
mod_ssl/2.8.16 OpenSSL/0.9.7c configured -- resuming normal operations

[Tue Oct  5 14:28:24 2004] [notice] Accept mutex: sysvsem (Default: =
sysvsem)

29896 Apache::DBI             push PerlCleanupHandler=20

29896 Apache::DBI             need ping: yes

19484 Apache::DBI             push PerlCleanupHandler=20

19484 Apache::DBI             need ping: yes

5939 Apache::DBI             push PerlCleanupHandler=20

5939 Apache::DBI             need ping: yes

27201 Apache::DBI             push PerlCleanupHandler=20

27201 Apache::DBI             need ping: yes

19484 Apache::DBI             new connect to
'host=3Dhostname;dbname=3Dmaster=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

6100 Apache::DBI             new connect to
'host=3Dhostname;dbname=3Dmaster=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

29896 Apache::DBI             new connect to
'host=3Dhostname;dbname=3Dmaster=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

5939 Apache::DBI             new connect to
'host=3Dhostname;dbname=3Dmaster=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

27201 Apache::DBI             new connect to
'host=3Dhostname;dbname=3Dmaster=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

6100 Apache::DBI             need ping: yes

6100 Apache::DBI             already connected to
'host=3Dhostname;dbname=3Dmaster=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

6100 Apache::DBI             PerlCleanupHandler=20

28772 Apache::DBI             PerlChildInitHandler=20

28772 Apache::DBI             push PerlCleanupHandler=20

28772 Apache::DBI             need ping: yes

28772 Apache::DBI             new connect to
'host=3Dhostname;dbname=3Dmaster=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

6100 Apache::DBI             push PerlCleanupHandler=20

6100 Apache::DBI             need ping: yes

6100 Apache::DBI             already connected to
'host=3Dhostname;dbname=3Dmaster=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

6100 Apache::DBI             PerlCleanupHandler=20

6100 Apache::DBI             push PerlCleanupHandler=20

6100 Apache::DBI             need ping: yes

6100 Apache::DBI             already connected to
'host=3Dhostname;dbname=3Dmaster=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

6100 Apache::DBI             push PerlCleanupHandler=20

6100 Apache::DBI             need ping: yes

6100 Apache::DBI             new connect to
'host=3Dhostname;dbname=3Dclient=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

6100 Apache::DBI             push PerlCleanupHandler=20

6100 Apache::DBI             need ping: yes

6100 Apache::DBI             new connect to
'host=3Dhostname;dbname=3Darchives=1Cusername=1Cpassword=1CAutoCommit=3D1=
=1CPrintError=3D1=1CU
sername=3Dusername'

6100 Apache::DBI             PerlCleanupHandler=20

6100 Apache::DBI             PerlCleanupHandler=20

6100 Apache::DBI             PerlCleanupHandler=20

6100 Apache::DBI             push PerlCleanupHandler=20

6100 Apache::DBI             need ping: yes

6100 Apache::DBI             already connected to
'host=3Dhostname;dbname=3Dmaster=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

6100 Apache::DBI             PerlCleanupHandler=20

11502 Apache::DBI             PerlChildInitHandler=20

11502 Apache::DBI             push PerlCleanupHandler=20

11502 Apache::DBI             need ping: yes

11502 Apache::DBI             new connect to
'host=3Dhostname;dbname=3Dmaster=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

5939 Apache::DBI             need ping: yes

5939 Apache::DBI             already connected to
'host=3Dhostname;dbname=3Dmaster=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

5939 Apache::DBI             push PerlCleanupHandler=20

5939 Apache::DBI             need ping: yes

5939 Apache::DBI             new connect to
'host=3Dhostname;dbname=3Dclient=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

5939 Apache::DBI             push PerlCleanupHandler=20

5939 Apache::DBI             need ping: yes

5939 Apache::DBI             new connect to
'host=3Dhostname;dbname=3Darchives=1Cusername=1Cpassword=1CAutoCommit=3D1=
=1CPrintError=3D1=1CU
sername=3Dusername'

5939 Apache::DBI             PerlCleanupHandler=20

5939 Apache::DBI             PerlCleanupHandler=20

5939 Apache::DBI             PerlCleanupHandler=20

5939 Apache::DBI             push PerlCleanupHandler=20

5939 Apache::DBI             need ping: yes

5939 Apache::DBI             already connected to
'host=3Dhostname;dbname=3Dmaster=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

5939 Apache::DBI             PerlCleanupHandler

<-- /snip -->

=20

Like I said, I know my setup is correct because the first 'master' =
database
get recycled properly, notice the:

=20

already connected to
'host=3Dhostname;dbname=3Dmaster=1Cusername=1Cpassword=1CAutoCommit=3D1=1C=
PrintError=3D1=1CUse
rname=3Dusername'

=20

..how come this doesn't happen with the second and third databases?

=20

This cause me problems because when I do a netstat -an on my database =
server
I see A LOTS of connection.

=20

Any help would be appreciated :-)

=20

Thanks

=20

L. Waterhouse

-- 
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

Reply via email to