[Zope-Perl] ZDBI_DA timeout / reconnect
Gisle Aas
gisle@ActiveState.com
13 Feb 2001 10:45:59 -0800
Ulrich Wisser <u.wisser@publisher.de> writes:
> as previously posted I have a problem with my Adabas D database.
> Although the timeout is disabled Zope will loose connection
> from time to time.
>
> I wondered if it is possible to implment an automatic reconnect
> like Apache::DBI?
Sure. I would still like to know why it looses the connection. Is
this a server timeout?
Can you test if a patch like this one fixes your problem:
==== //depot/main/Apps/Bifrost/zoperl/lib/perl/Zope.pm#8 - /home/gisle/bifrost/zoperl/lib/perl/Zope.pm ==
==
@@ -198,7 +198,7 @@
{
my($id, $source) = @_;
my $dbh = $DBH{$id};
- if ($dbh && $dbh->[0] eq $source) {
+ if ($dbh && $dbh->[0] eq $source && $dbh->[1]->ping) {
$dbh = $dbh->[1];
}
else {