|
From: | Sullivan,Deric [CMC] |
Subject: | [Koha-devel] z3950 search problems |
Date: | Tue Feb 24 12:35:01 2004 |
Hi,
I've had a problem with the z3950 search client and I've noticed that others have had a similar problem. It's the problem where the database connection is lost and reported in one of the log files. Here's what I did to get rid of the symptoms. I'm not a Koha expert, nor a Perl expert, and I usually use PostgreSQL instead of MySQL so I make no guaranties that this fix is correct, but it does stop processz3950queue from complaining the way it did and it seems to make sense that a forked process that terminates should not be using, in the default fashion, any handles that the parent process is relying on. The forked process used a new name ($dbi) for the handle, but it was the same handle. Although even using "my $dbi = C4::Context->new_dbh" instead of "my $dbi = C4::Context->dbh" would not have worked since the child still keeps the reference to the parents handle (because it was created before the fork) and this handle would be destroyed when the child terminated. At least that's how I see it. There are probably other problems because even after these modifications, the search client still did not seem to work.
Replace:
my $dbi = C4::Context->dbh;
with:
$dbh->{"InactiveDestroy"} = "true";
Replace all references to dbi with dbh.
Deric
The views expressed here are mine and do not reflect the official position of my employer or the organization through which the Internet was accessed.
[Prev in Thread] | Current Thread | [Next in Thread] |