2 quick notes.

Have you seen the epigone archives? I'm sure I've seen mention
of SIGPIPE in this scenario some time before.

Upgrade! You are using old versions of apache, perl and mod_perl.

-----Original Message-----
From: Balazs Rauznitz [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 25, 2002 1:11 AM
To: [EMAIL PROTECTED]
Subject: DBI/MySQL causing SIGPIPE



My setup is apache/modperl+Apache::DBI with MySQL driver. On server startup
in every httpd child a few queries that are executed very often are
prepared. When the Apache::Registry scripts run values are bound to the
cursors and they are executed. The server runs ok for 6-10 hours and then
I'm seeing these messages in the error_log when trying to execute the
cursors

[modperl] caught SIGPIPE in process 12620
    hint: may be a client (browser) hit STOP?

My initial guess was that the mysql daemon of the cursor has exitted, so I
had the library recompiled by having all apache children execute a "do
'db.pl'" using a custom USR2 handler. Take a look at the file below: I think
that the db connection and the cursor should have been reinitialized, but
the SIGPPIPE remained. Now my guess is that Apache::DBI gets confused
somehow... To stop the problem I added a $SIG{PIPE} = sub {} into the code,
which works well, but isn't this going to cause other problems with mod_perl
?

apache          1.3.12
mod_per         1.23
perl            5.005_03
Apache::DBI     0.87
DBI             1.14

Any help would be greatly appreciated.

Thanks,

-Balazs

ps: The library looks something like this:

#db.pl
$DBH = &connect();
$CURSOR = $DBH->prepare("some sql");

sub routine {
    $CURSOR->bind_param(1, "$_[0]");
    $SUSPECTS_CUR->execute();
    .
    .
}


------------------------------------------------------------------------------
This message is intended only for the personal and confidential use of the designated 
recipient(s) named above.  If you are not the intended recipient of this message you 
are hereby notified that any review, dissemination, distribution or copying of this 
message is strictly prohibited.  This communication is for information purposes only 
and should not be regarded as an offer to sell or as a solicitation of an offer to buy 
any financial product, an official confirmation of any transaction, or as an official 
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or 
error-free.  Therefore, we do not represent that this information is complete or 
accurate and it should not be relied upon as such.  All information is subject to 
change without notice.


Reply via email to