I also use Fedora Core 1 with the same version of perl and mysql as you. I did the following changes to processz3950queue and the "MySQL server has gone away" and "fetch() without execute()" error messages went away. I did this to the file that came with 2.0.0RC4 but it should work with the latest file that Paul commited. Replace: my $dbi = C4::Context->dbh; with: $dbh->{"InactiveDestroy"} = "true"; Replace all references to dbi with dbh. Deric -----Original Message----- From: Benedykt P. Barszcz [mailto:kb2qzv@poczta.wp.pl] Sent: 26 February, 2004 16:39 To: paul POULAIN Cc: Sullivan,Deric [CMC]; 'koha-devel@lists.sourceforge.net' Subject: Re: [Koha-devel] log about z3950 This is even more informative. I am using Fedora Core 1. [root@localhost z3950daemon]# perl -V Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration: Name : mysql Relocations: (not relocateable) Version : 3.23.58 Vendor: Red Hat, Inc. 3351/16 : Processing isbn=83-01-02448-8 at Library of Congress z3950.loc.gov:7090 voyager MARC21 (1 forks) 3351/16 : 2 >> 3351/16 : creating and 3351/16 : working on results entry 14 3351/16 : connected to Library of Congress 3351/16 : Library of Congress : no records found 3351/16 : z3950.loc.gov:7090 search done. starting loop DBD::mysql::st execute failed: MySQL server has gone away at ./processz3950queue line 144. DBD::mysql::st execute failed: MySQL server has gone away at ./processz3950queue line 149. DBD::mysql::st fetchrow failed: fetch() without execute() at ./processz3950queue line 150. starting loop
W liście z czw, 26-02-2004, godz. 23:22, Sullivan,Deric [CMC] pisze:
Replace: my $dbi = C4::Context->dbh; with: $dbh->{"InactiveDestroy"} = "true";
Replace all references to dbi with dbh.
I think that Paul has removed this instance of my $dbi = C4:: ... Instead there's this: my $dbi = DBI->connect("DBI:$db_driver:$db_name:$db_host",$db_user, ... Since I am not a perl guru, could anyone enlighten me what to do? Benedict
Benedykt P. Barszcz wrote:
W liście z czw, 26-02-2004, godz. 23:22, Sullivan,Deric [CMC] pisze:
Replace: my $dbi = C4::Context->dbh; with: $dbh->{"InactiveDestroy"} = "true";
Replace all references to dbi with dbh.
I think that Paul has removed this instance of my $dbi = C4:: ... Instead there's this: my $dbi = DBI->connect("DBI:$db_driver:$db_name:$db_host",$db_user, ...
Since I am not a perl guru, could anyone enlighten me what to do?
The idea is : * the DB handler, when the process is forked, is forked too. So, 2 process use the same DB, and one can close the connection that the other tries to use. so, the solution is to have a specific handler for every process. My modif should do the same thing as the InactiveDestroy one : it opens a new handler. Let's try it again. If it does not work, i'll modify the processz3950queue to avoid forks. the limit here is that searches on various z3950servers will no more be asynchronous. So i would use a parameter to decide how many forks we accept. But I hope my "hard coded opening of dbh" will work. -- Paul POULAIN Consultant indépendant en logiciels libres responsable francophone de koha (SIGB libre http://www.koha-fr.org)
participants (3)
-
Benedykt P. Barszcz -
paul POULAIN -
Sullivan,Deric [CMC]