Quoting Joel Gwynn <[EMAIL PROTECTED]>:

> While looking through my server logs for the reason behind sporadic 
> failures of my script, I found this line:
> 
> Issuing rollback() for database handle being DESTROY'd without explicit 
> disconnect()
> 
> In my 'teardown' method, I'm disconnecting like so:
> 
> sub teardown {
>     my $self = shift;
>     $self->param('dbh')->disconnect();
> }
> 
> So I'm not sure why I'm getting that error message.  The message occurs 
> even the script works properly.
> 
> BTW, the other error, which seems to occur once in 20 times is:
> 
> Premature end of script headers:
> 
> Any ideas why this is happening?  Any ideas how I can get more 
> information about this?

Hello Joel,
  I would suggest adding a line in your app to log your database transactions.  
This will help to debug where the breakdown of your database handle is 
occuring.  You can do this with the DBI class method trace(), like this:

package MyApp;
use strict;
use base 'CGI::Application';
use DBI;
DBI->trace(1,"/tmp/my_database_debugging.log");


See http://www.perldoc.com/perl5.6.1/lib/DBI.html#DBI-Class-Methods under trace
() for more info.


-spencer christensen
[EMAIL PROTECTED]

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to