Large Downloads Failing [Solution For...]

1 post / 0 new
#1 Sun, 03/29/2015 - 10:57
Bit32

Large Downloads Failing [Solution For...]

Symptoms
Starting a download works but if the file is of a certain size (anything over about hundred megabytes) and/or the connection speed is slow then the download will stop after approximately 6 minutes in. This will result in a corrupted, partially complete download.

Note: This issue is relevant to Virtualmin installations running PHP with SuEXEC / FCGI

Solution
Edit the file:

/etc/apache2/mods-enabled/fcgid.conf

Add the following line replacing [time in seconds]:

FcgidBusyTimeout [time in seconds]

Time in seconds specifies how long a download can be active before failing...

14400 = 4 hours
3600 = 1 hours
300 = 5 minutes (default settings)

I am unable to advise about any performance impact that might result from setting this parameter to a higher value however I have it set to 14400 and have not noticed any problems personally.

-

Discussion of
Although I've known about this issue for some years now (it originally took many frustrating hours to debug and fix) I recently experienced the same problem again on a new setup I wondered whether there was an argument for increasing the default setting in Virtualmin given it must be a common and fairly asinine restriction?

It's apparent function (and low default value) is to allow termination of hung applications. I'm left wondering however how often applications fail versus the basic requirement of many websites to handle large file downloads.

I have searched online but found no discussion as to it's any possible performance impact.

Is there a valid reason for it being left at it's default value or valid concerns that suggest the value should only be increased sparingly?

Also is it generally fine to add globally or should it only be added to the .conf of each sites apache file on a case by case basis?