[users@httpd] Apache 2.2, 2.0 and 1.3: Large downloads failing when Timeout parameter lowered

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everyone,

It could be that I've identified a bug in Apache that prevents large
files from being downloaded successfully when a 'lower than default'
Timeout setting is used in httpd.conf. Per the standard bug guidelines
I'd like to check on the list first to see whether someone else has
experienced similar issues.

A roundup of the issue:

- We publish the following file:

115120550 (size) May 22 17:21 Syllable-0.6.1-dev4.zip

When this file is downloaded, the download halts intermediately, at
around 24 MB. From the point of view of the server, it looks like the
download completed succesfully. This is the same on the client side.

This was tested and identified as an issue with Apache 1.3.24, 2.0.58
(both with added modules) and Apache 2.2.2 (clean install per bug
reporting requirements, no additional modules). This was on the same
server, running RedHat 7.1 with Apache installed from source. A test
with another Apache 2.0.58 on a separate server showed the same issue,
but at a different point in the download.

This interruption occurred on one server after approximately 7 minutes,
when the transfer had completed 24 MB. On the other server I tested,
this happened after 9 minutes, with a 20 MB completion rate. Downloads
from faster connections (less than 6 minutes of transfer time) went
smoothly and without interruption.

The issue only occurs when the Timeout parameter in httpd.conf is
lowered from its default of 300 seconds to 60 seconds. Note that this is
a common change, made to either improve performance or mitigate the
impact of certain types of denial of service attacks against the server.
When changing the value back to its default of 300 seconds the download
does complete correctly.

No entry appears in the error log, but a regular 200 request appears in
the access_log:

203.59.90.155 - - [16/Jun/2006:08:19:14 +0000] "GET
/Syllable-0.6.1-dev4.zip HTTP/1.1" 200 115120550

This was tested with Firefox, Internet Explorer and Wget, which all gave
identical results (with wget automatically retrying using a specified
byte-range so it did in fact complete the download).

Apache documentation mentions that Timeout defines the amount of time
Apache will wait for any of the following three things:

- The total amount of time it takes to receive a GET request.
- The amount of time between receipt of TCP packets on a POST or PUT
request.
- The amount of time between ACKs on transmissions of TCP packets in
responses.

I've made a PCAP file of an interrupted transfer:

http://www.daemon.be/apache-failed-down.cap

If you look at this file you can see that everything seems to go fine,
and then suddenly at frame 25947, 7.35 minutes after the connection was
established, the Apache server suddenly sends a packet with the fin,
push and ack flags set. This disrupts the connection.

As such, none of the above conditions apply: (1) a GET request was
received and is being served, (2) I don't really see any of both parties
in the transaction being unresponsive. This shouldn't match the Timeout
value. It appears somewhere in the download code the counter used to
measure this timeout isn't being increased.

If you have issues replicating it with a different file, the original
which caused us issues for quite a while prior us discovering the link
with the Timeout option can be found here:

http://www.cilinder.be/syllable/Syllable-0.6.1-dev4.zip

Looking forward to your responses. If anyone has any ideas before I
create a bug report for this issue, please let me know.

Cheers,
Maarten

-- 
Maarten Van Horenbeeck, CISSP GCIA GCIH
maarten@xxxxxxxxx - http://www.daemon.be/maarten

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux