You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by se...@gmail.com on 2010/08/05 04:34:15 UTC

Apache2::RequestIO::print: (53) Software caused connection abort

Error logs are filling up with strange "File does not exist" errors and code
is trapping Apache exception:

         Apache2::RequestIO::print: (53) Software caused connection abort

These errors are repeatably caused by client breaking the connection before
page has loaded (page loads slowly because of extensive javascript).

Is Apache misconfigured? Is my code failing to handle interrupt? Guidance
greatly appreciated!

Server: Apache/2.2.15 (FreeBSD) mod_ssl/2.2.15 OpenSSL/0.9.8e DAV/2
mod_perl/2.0.4 Perl/v5.10.1
Framework: Catalyst

-- 
Bikewise: http://www.bikewise.org

Re: Apache2::RequestIO::print: (53) Software caused connection abort

Posted by Phil Mitchell <ph...@2people.org>.
On Thu, Aug 5, 2010 at 5:42 AM, André Warnier <aw...@ice-sa.com> wrote:

> seasprocket@gmail.com wrote:
>
>> Just to clarify: javascript is not causing connection to time out. User is
>> clicking a link before javascript finishes and page load completes.
>>
>> Basically, Apache and mod_perl and your application are reacting properly
> : they can no longer write to the client, so they abort and log an error.
>
> I would recommend trying to fix the root of the problem, rather than the
> symptom :
> In 99% of the cases, the user clicks somewhere else because he is tired of
> waiting for the page to load.


Good point. We are considering redesigning our home page (bikewise.org), bc
it does take a while to load and users often have another destination in
mind. However, meantime, it's not really an error if the user clicks on a
link before the page finishes loading. The page does display a "Loading ..."
message. The problem is that our error logs are filling up with this
non-error rendering them a bit useless.



> Usually, that means at least 30 seconds ot so during which the user sees
> nothing much happening and starts wondering if his click got lost, or if the
> server or application is down. (People in airports get that way too, when
> their flight is delayed but nobody tells them anything).
>
> The evident symptom is those logfile messages.  The not-so evident
> consequence however, is a bunch of users getting upset because in their
> view, the site is slow or doesn't work.
>
> So, root of the problem : why is it taking so long ?
>
> If there is a large javascript section in the page itself, it may help to
> see to it that this javascript is loaded only once, and cached by the
> browser. (And that would also speed up your website in general).
>
> If it is the javascript itself doing something that takes so long (without
> user feedback) that the user gets impatient, then maybe you should have a
> look at that javascript.
>
> A good tool to study this kind of issue is a browser plugin like HttpFox
> (for Firefox) or Fiddler2 (for IE).  These will show you exactly how the
> conversation looks like, from the browser point of view. It will maybe also
> show you that the same javascript monster is being requested over and over
> again, instead of being cached.  Or it may show you that the  browser is
> requesting icons, images, stylesheets that do not (or no longer) exist, and
> that this is uselessly consuming your bandwidth.
>
> Another last-hope counter-measure would be to at least display something to
> the user, asking them to be patient and wait until the page is loaded.
>
>
>
>  On Wed, Aug 4, 2010 at 7:34 PM,  <se...@gmail.com> wrote:
>>>
>>>> Error logs are filling up with strange "File does not exist" errors and
>>>>
>>> code
>>>
>>>> is trapping Apache exception:
>>>>         Apache2::RequestIO::print: (53) Software caused connection abort
>>>> These errors are repeatably caused by client breaking the connection
>>>>
>>> before
>>>
>>>> page has loaded (page loads slowly because of extensive javascript).
>>>> Is Apache misconfigured? Is my code failing to handle interrupt?
>>>> Guidance
>>>> greatly appreciated!
>>>> Server: Apache/2.2.15 (FreeBSD) mod_ssl/2.2.15 OpenSSL/0.9.8e DAV/2
>>>> mod_perl/2.0.4 Perl/v5.10.1
>>>> Framework: Catalyst
>>>>
>>>> --
>>>> Bikewise: http://www.bikewise.org
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>
>>
>


-- 
Bikewise: http://www.bikewise.org

Re: Apache2::RequestIO::print: (53) Software caused connection abort

Posted by André Warnier <aw...@ice-sa.com>.
seasprocket@gmail.com wrote:
> On Wed, Aug 4, 2010 at 7:45 PM, Fred Moyer <fr...@redhotpenguin.com> wrote:
> 
>> Are you trying to surpress the error message or fix the problem?  The
>> problem seems to be that your javascript is causing the connection to
>> time out.  Maybe increase the keep alive timeout?
>>
> 
> Just to clarify: javascript is not causing connection to time out. User is
> clicking a link before javascript finishes and page load completes.
> 
> 

Basically, Apache and mod_perl and your application are reacting properly : they can no 
longer write to the client, so they abort and log an error.

I would recommend trying to fix the root of the problem, rather than the symptom :
In 99% of the cases, the user clicks somewhere else because he is tired of waiting for the 
page to load.  Usually, that means at least 30 seconds ot so during which the user sees 
nothing much happening and starts wondering if his click got lost, or if the server or 
application is down. (People in airports get that way too, when their flight is delayed 
but nobody tells them anything).

The evident symptom is those logfile messages.  The not-so evident consequence however, is 
a bunch of users getting upset because in their view, the site is slow or doesn't work.

So, root of the problem : why is it taking so long ?

If there is a large javascript section in the page itself, it may help to see to it that 
this javascript is loaded only once, and cached by the browser. (And that would also speed 
up your website in general).

If it is the javascript itself doing something that takes so long (without user feedback) 
that the user gets impatient, then maybe you should have a look at that javascript.

A good tool to study this kind of issue is a browser plugin like HttpFox (for Firefox) or 
Fiddler2 (for IE).  These will show you exactly how the conversation looks like, from the 
browser point of view. It will maybe also show you that the same javascript monster is 
being requested over and over again, instead of being cached.  Or it may show you that the 
  browser is requesting icons, images, stylesheets that do not (or no longer) exist, and 
that this is uselessly consuming your bandwidth.

Another last-hope counter-measure would be to at least display something to the user, 
asking them to be patient and wait until the page is loaded.


>> On Wed, Aug 4, 2010 at 7:34 PM,  <se...@gmail.com> wrote:
>>> Error logs are filling up with strange "File does not exist" errors and
>> code
>>> is trapping Apache exception:
>>>          Apache2::RequestIO::print: (53) Software caused connection abort
>>> These errors are repeatably caused by client breaking the connection
>> before
>>> page has loaded (page loads slowly because of extensive javascript).
>>> Is Apache misconfigured? Is my code failing to handle interrupt? Guidance
>>> greatly appreciated!
>>> Server: Apache/2.2.15 (FreeBSD) mod_ssl/2.2.15 OpenSSL/0.9.8e DAV/2
>>> mod_perl/2.0.4 Perl/v5.10.1
>>> Framework: Catalyst
>>>
>>> --
>>> Bikewise: http://www.bikewise.org
>>>
>>>
>>>
>>>
> 
> 
> 


Re: Apache2::RequestIO::print: (53) Software caused connection abort

Posted by se...@gmail.com.
On Wed, Aug 4, 2010 at 7:45 PM, Fred Moyer <fr...@redhotpenguin.com> wrote:

> Are you trying to surpress the error message or fix the problem?  The
> problem seems to be that your javascript is causing the connection to
> time out.  Maybe increase the keep alive timeout?
>

Just to clarify: javascript is not causing connection to time out. User is
clicking a link before javascript finishes and page load completes.


>
> On Wed, Aug 4, 2010 at 7:34 PM,  <se...@gmail.com> wrote:
> > Error logs are filling up with strange "File does not exist" errors and
> code
> > is trapping Apache exception:
> >          Apache2::RequestIO::print: (53) Software caused connection abort
> > These errors are repeatably caused by client breaking the connection
> before
> > page has loaded (page loads slowly because of extensive javascript).
> > Is Apache misconfigured? Is my code failing to handle interrupt? Guidance
> > greatly appreciated!
> > Server: Apache/2.2.15 (FreeBSD) mod_ssl/2.2.15 OpenSSL/0.9.8e DAV/2
> > mod_perl/2.0.4 Perl/v5.10.1
> > Framework: Catalyst
> >
> > --
> > Bikewise: http://www.bikewise.org
> >
> >
> >
> >
>



-- 
Bikewise: http://www.bikewise.org

Re: Apache2::RequestIO::print: (53) Software caused connection abort

Posted by Fred Moyer <fr...@redhotpenguin.com>.
One approach that comes to mind is to print smaller chunks of the
response and between those check $r->connection->aborted to see if the
connection is still alive.  However I don't think you'll be successful
with that approach since the connection is broken while printing to
the client.

Are you trying to surpress the error message or fix the problem?  The
problem seems to be that your javascript is causing the connection to
time out.  Maybe increase the keep alive timeout?

On Wed, Aug 4, 2010 at 7:34 PM,  <se...@gmail.com> wrote:
> Error logs are filling up with strange "File does not exist" errors and code
> is trapping Apache exception:
>          Apache2::RequestIO::print: (53) Software caused connection abort
> These errors are repeatably caused by client breaking the connection before
> page has loaded (page loads slowly because of extensive javascript).
> Is Apache misconfigured? Is my code failing to handle interrupt? Guidance
> greatly appreciated!
> Server: Apache/2.2.15 (FreeBSD) mod_ssl/2.2.15 OpenSSL/0.9.8e DAV/2
> mod_perl/2.0.4 Perl/v5.10.1
> Framework: Catalyst
>
> --
> Bikewise: http://www.bikewise.org
>
>
>
>