Subject: | Broken pipe: core_output_filter: hang |
Date: | Wed, 26 Aug 2009 17:23:00 +0000 (GMT) |
To: | bug-HTML-Mason [...] rt.cpan.org |
From: | morten bjoernsvik <morten_bjoernsvik [...] yahoo.no> |
Hi
I've been hampered by a hang due to a broken pipe, which never returns the handler, it is critical and we need to restart apache to reset it.
[Wed Aug 26 18:42:55 2009] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Wed Aug 26 18:42:55 2009] [error] [client 127.0.0.1] Apache2::RequestIO::print: (103) Software caused connection abort at /opt/perl/lib/site_perl/5.8.9/HTML/Mason/ApacheHandler.pm line 1019, referer: http://localhost/auth/agent-instances/
In the beginning we only saw it with https calls, but when the database processing grow large in http we saw it there also. Then I realized it was not a https issue.
Turns out adding an eval to the hanging call fixes it. I'm not sure if this is correct, but our code works fine with this.
Could you please verify and add this workaround.
/opt/perl/bin/perl -e 'use HTML::Mason::ApacheHandler; print $HTML::Mason::ApacheHandler::VERSION . "\n"'
1.69
mortenb2:/opt/perl/lib/site_perl/5.8.9/HTML/Mason # cat ApacheHandler_BrokenPipe_hang_fix.patch
*** ApacheHandler_orig.pm Wed Aug 26 18:57:53 2009
--- ApacheHandler.pm Wed Aug 26 18:52:20 2009
***************
*** 1012,1023 ****
# Craft the request's out method to handle http headers, content
# length, and HEAD requests.
my $out_method;
! if (APACHE2) {
!
# mod_perl-2 does not need to call $r->send_http_headers
$out_method = sub {
! $r->$final_output_method( grep { defined } @_ );
! $r->rflush;
};
} else {
--- 1012,1027 ----
# Craft the request's out method to handle http headers, content
# length, and HEAD requests.
my $out_method;
! if (APACHE2) {
# mod_perl-2 does not need to call $r->send_http_headers
$out_method = sub {
! eval{
! $r->$final_output_method( grep { defined } @_ );
! $r->rflush;
! };
! if($@) {
! return;
! }
};
} else {
Thanks
--
Morten Bjoernsvik, Oslo, Norway
Show quoted text
_________________________________________________________
Alt i ett. Få Yahoo! Mail med adressekartotek, kalender og
notisblokk. http://no.mail.yahoo.com