Re: how to trap connection reset/abort in Apache::Filter?

[prev] [thread] [next] [Date index for 2005/05/11]

From: Stas Bekman
Subject: Re: how to trap connection reset/abort in Apache::Filter?
Date: 23:04 on 11 May 2005
Jeff Ambrosino wrote:
> Hi Stas & MP list,
> 
> I tried causing this error by opening sockets to the web server, then
> killing (-9) the client, but that didn't work. However, every morning
> like clockwork the scanning service (ScanAlert) hits our site and
> causes this problem...  so, while I cannot intentionally cause the
> error by myself, I know when our scanning service will do so, and I
> could put some additional code in place to watch for it.  If there are
> additional debug/traps that you could suggest, I'd like to try.  Any
> ideas?

I'm playing with this issue. I've notice that we already have a reliably 
reproducable issue with t/protocol/echo_nonblock.t which calls 
t/protocol/TestProtocol/echo_nonblock.pm. Could you please try the current 
svn (if you go for the snapshot please wait for 6 hours, since I've just 
committed things) [1]

There I now use the code:

   die $@ unless ref $@ eq 'APR::Error'
                     && (APR::Status::is_ECONNABORTED($@) ||
                         APR::Status::is_ECONNRESET($@));

can you also see that die doesn't appear in the error_log of the test 
suite? and if you just do

   die $@;

it logs the error?

t/TEST -v t/protocol/echo_nonblock.t

and check t/logs/error_log

[1] 
http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_Distribution

        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

(message missing)

Re: how to trap connection reset/abort in Apache::Filter?
Stas Bekman 23:04 on 11 May 2005

Generated at 15:53 on 25 May 2005 by mariachi v0.52