[ic] intermittent 500 error with Link.pm

Grant emailgrant at gmail.com
Sat Oct 1 09:43:36 UTC 2016

>> I'm seeing a fair number of 500s in my apache2 access_log which
>> correlate to these in my apache2 error_log:
>> Software caused connection abort at Interchange/Link.pm line 772.\n
>> Line 772 is 'print @out;' from below:
>> $r->content_type($set_content);
>> my $no_blank_lines = $r->dir_config('NoBlankLines');
>> while (<SOCK>) {
>> push @out, $_ unless $no_blank_lines and ! /\S/;
>> }
>> close (SOCK) or die "close: $!\n";
>> print @out;
>> I'm sometimes able to duplicate the problem in a browser by clicking a
>> new link before the previously clicked link has delivered its HTML.
>> My perl skills are weak but does Link.pm need to handle some kind of
>> an exception at line 772?
> My guess would be that that is happening when the client's connection is
> broken and Apache closes its filehandles that the program is writing to.
> It's pretty amazing how many connections fail to complete on any given day
> out there in the wild.

I think you're exactly right but can I handle that scenario properly
in Link.pm so that a 500 is not produced?

- Grant

More information about the interchange-users mailing list