You didn't specify which Database server you're using. If it's mysql you need to be cautious of the 'ping' method used by Apache::DBI to check if a connection is stale or not. the DBD::mysql ping method always returns a 'true' string e.g. "0 but true" rather than a 1 or a 0.
 
I believe the latest version of DBD::mysql has an automatic 'reconnect' feature, but We're still seeing failed connections occuring infrequently on our systems. (Still investigating).
 
Marty

Perrin Harkins <[EMAIL PROTECTED]> wrote:
On Wed, 2004-05-12 at 12:15, I S wrote:
> a) I don't understand why the database sometimes gets
> dropped. It happens randomly but frequently.
>
> could not prepare: Database disconnected at
> /dssweb/httpd/cgi-bin/feeds/viewReport line 157.

Usually this is caused by an inactivity timeout on your database
server. If you call DBI->connect before that, Apache::DBI will ping the
connection to make sure it is still live and re-connect if it isn't.

> b) I built mod_perl and apache with EVERYTHING=1.
> Should I expect DBI.pm appear in Apache directory?

EVERYTHING=1 affects which hooks are enabled for mod_perl handlers. It
has nothing to do with which modules will be available.

Apache::DBI comes with mod_perl, and you should see it in your site_perl
directory. It is a pure perl module, so it would not be under an i386
directory (or whatever your architecture is). If you can do PerlModule
Apache::DBI in your program without failure, it means that it is there
in your @INC path.

- Perrin


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