0

We have just moved our site to a new server, and keep seeing this error message:

[Tue Nov 07 14:57:08.796821 2017] [:error] [pid 1777] :Apache2 IO write: (32) Broken pipe at /home/example/web/example.org/public_html/cgi-bin/links/admin/Booking/Calendar.pm line 228

Line 228 is:

print Links::SiteHTML::display('calendar_view_room', { month_loop => \@dates, owner_id_fk => $room_owner_useridfk, room_name => $room->{room_name_show}, target => $target, room_id => $room_id });

The server setup is nginx front end, and then a proxy pass for the Perl stuff over to Apache 2.4. We are also using mod_perl on the Apache end.

Is there anything I could look at, to try and figure out why this error comes up? The only thing I could find on Google goes back to 2009, and wasn't that much help.

UPDATE: To try and work out the IP's causing this issue (so I can see if they are genuine, or bots), I've updated my Apache error log conf to:

ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"

I get the new format fine for some:

[Wed Nov 08 08:54:41 2017] [error] [pid 12574] util_script.c(591): [client 122.119.97.15:42982] malformed header from script 'community.cgi': Bad header:

...but for the errors relating to the IO, I don't get anything for the client?

[Wed Nov 08 08:59:53 2017] [error] [pid 12576] Apache2__Log.h(331): [client :Apache2 IO write: (32) Broken pipe at /home/example.org/public_html/cgi-bin/links/admin/Booking/Calendar.pm line 228

Andrew Newby
  • 4,941
  • 6
  • 40
  • 81
  • 1
    Correlate the errors with requests and see if they are from legitimate users? From my own experience they seem to come from bots that send a request, but close the connection before getting a response. – Chris Turner Nov 07 '17 at 15:38
  • @ChrisTurner thanks will look into that. Bit tricky to do, as the error log doesn't have an IP in. Maybe I can tweak the error log format so it includes it for the future occurences – Andrew Newby Nov 07 '17 at 15:52
  • @ChrisTurner - I've updated my `ErrorLogFormat` in Apache, to try and find the IPs... but for some reason, on that error it doesn't work? (please see my updated question). Any ideas? – Andrew Newby Nov 08 '17 at 09:14

2 Answers2

5

This error occurs when the client has gone away before all the output is sent. On earlier versions of apache/mod_perl (apache 2.0?) it just failed silently (and I think it was a connection aborted error on 2.2).

I see these from legitimate requests with very large output or, occasionally, mobile users and just ignore them, as long as there aren't enough to indicate some larger problem.

ysth
  • 96,171
  • 6
  • 121
  • 214
1

Since migrating to apache2.4, we've seen these errors regularly too:

IO write: (32) Broken pipe

They are triggered by a client terminating the connection incorrectly, something that was ignored in previous versions of apache, or reported under a different error.

We also (on 2.4) see the similar error

Apache2 IO write: (104) Connection reset by peer

Up to apache2.2, we saw this error:

IO write: (103) Software caused connection abort

The vast majority (but not all) of these errors are triggered by bots and also use HTTP 1.0 protocol rather than 1.1, but I'm sure that bona-fide network and client errors will trigger them too.

IainK
  • 11
  • 1