connect_on_init() creates the database connection when the Apache child process starts (vs when it serves the first request). This ensures that the first request gets to use an existing connection vs having to wait for a connection to be made.
Also to benefit from Apache::DBI functionality your script needs to be running under modperl (via Apache2::Registry). Is it running under modperl? On 7/30/07, Ken Perl <[EMAIL PROTECTED]> wrote: > I've configured the Apache::DBI in httpd.conf like this, > > PerlModule Apache::DBI > > I didn't have Apache::DBI->connect_on_init($data_source, $username, > $auth, \%attr) in startup.pl since we don't use startup.pl. and the > doc says to config it in httpd.conf is OK. > > my question is I can not find any persistent connections for my CGI > script. any usage error here? > > -- > perl -e 'print unpack(u,"62V5N\"FME;G\!E<FQ`9VUA:6PN8V]M\"[EMAIL PROTECTED] > ")' >