Web Hosting Talk







View Full Version : Apache randomly times out while sending large files


porcupine
10-26-2002, 03:13 PM
Anyone else run into this? I've tested this on 3 of our own CPanel/WHM servers, all with different configurations, and found that when downloading 50mb+ files over http they randomly died without error on the server side, just timed out.

We've tried this on redhat 7.2, and 7.3 servers, some running the latest buildapache, some running older ones, different domains, etc. you name it. Can anyone think of a configuration parm that might be doing this? We've got a client or two who apparently just noticed their sites could not send legitimate 100mb+ files.

Suggestions welcome, im relatively stumped :eek: :).

BiaSecurity
10-26-2002, 06:24 PM
downloads over httpd tend to have this problem alot, with files of that size you should look in your conf files and see how you have it set up in realations to long connections.. maybe you might want to switch to ftp

porcupine
10-26-2002, 07:02 PM
Thats what i've suggested for this user, but he insists it's absolutly necessary over http. Typically the downloads die after a minute or two, sometimes less, these files are 50+ mb. which settings would be in direct relation to this? Any ideas?

PHBPendragon
10-26-2002, 09:09 PM
Whats the Timeout and KeepAlive set to ?
Check MaxClients & MaxRequestsPerChild, too.
Most likely upping the timeout value to 900 will do it.

bitserve
10-27-2002, 12:03 PM
I wouldn't think that the Timeout would be causing the problem, unless the TCP connection actually is going idle.

What you are experiencing is not normal. We have made full CD ISO images available through HTTP with no problems.

You might try doing a tcpdump on the connection, to see if it is going idle, and why. And also, doing an strace on the PID, to see what is happening with it.

Is it possible that you have a resource limit on CPU time for the HTTP processes?

porcupine
10-27-2002, 02:19 PM
Actually, i changed the timout value last night and the user reports it works great now :). There are no resource ilmits that were coming into play in this equation.

bitserve
10-27-2002, 03:00 PM
Assuming the maximum length of a TCP/IP packet being 65535 bytes, it seems like the problem would have shown itself with any download of two TCP packets or more, not just 50MB or larger files. They must have an intermittently bad Internet connection.

If you assume a 56K connection for most users, you would want the Timeout set for at least 10 seconds, 30 would allow for most any type of connection. Anything higher than 60, and you're compensating for a horrible TCP connection.

Anyway, are you sure there wasn't an error logged on the server side? If apache times out due to the Timeout setting, I think you should see a 408 error.