Hi all,

I'm having problems setting up the apache + mod_perl + Apache::DBI in order to get persistent db connections.

I've added the following line in my httpd.conf:
    PerlRequire /home/xxx/startup.pl

The startup.pl file contains:
   #!/usr/local/bin/perl -w
   $ENV{MOD_PERL} or die "GATEWAY_INTERFACE not Perl!";

   use Apache::Registry;
   use Apache::DBI;
   use strict;

   # choose debug output: 0 = off, 1 = quiet, 2 = chatty
   $Apache::DBI::DEBUG = 2;


I've check using the Apache::Status if the

PERL_CHILD_INIT=1 PERL_STACKED_HANDLERS=1 are enabled.

PerlChildInitHandler* Enabled
* PerlStackedHandlers* Enabled*


However, the persistent connections still does not work. The system creates a new db connection for earch child.

That's my error.log file (it contains 2 requests):

[Tue Dec 13 11:05:42 2005] [notice] Apache/1.3.33 (Debian GNU/Linux) mod_perl/1.29 configured -- resuming normal operations
[Tue Dec 13 11:05:42 2005] [notice] Accept mutex: sysvsem (Default: sysvsem)
9178 Apache::DBI             push PerlCleanupHandler
9178 Apache::DBI             need ping: yes
9178 Apache::DBI new connect to 'imenteFiltres;host=bdd1.colt.imente.comimentefah6Foyo$AutoCommit=1PrintError=1RaiseError=0Username=imentedbi_connect_method=Apache::DBI::connect'
9178 Apache::DBI             PerlCleanupHandler

9180 Apache::DBI             push PerlCleanupHandler
9180 Apache::DBI             need ping: yes
9180 Apache::DBI new connect to 'imenteFiltres;host=bdd1.colt.imente.comimentefah6Foyo$AutoCommit=1PrintError=1RaiseError=0Username=imentedbi_connect_method=Apache::DBI::connect'
9180 Apache::DBI             PerlCleanupHandler

Any comments?

Thanks,

Albert

Reply via email to