Large file download.

Just asking a question here, is there anything in Virtualmin, or Webmin that sets the maximum file size to Download. I need to check it to see if there is a problem with the download file size, as I have a lot of very large files my customers can download.




Howdy -- no, there shouldn't be any file size limits in Apache. There's some talk about Apache 1.3 having a 4GB limit, but I believe Apache 2.x doesn't have any such restrictions.

Thanks andreychek

I didn't think so, but I have had a few users complain about getting corrupt Files, and it always turns out that there download got cut off early, so I had to ask. It only happens on large files.


How and what exactly are they downloading? The only thing that comes to mind here that might give some trouble is if the DL data is generated by a PHP/CGI script which gets killed prematurely due to "reached maximum execution time".

Otherwise this sounds rather like an Apache or more likely a networking issue; Virtualmin does not impose any download limits.


I am dealing with an identical issue right now with two domains. Files of 300+ MB fail to complete in IE, FF and Chrome. Download manager will succeed.

File cut-off seems to vary too.

As an experiment I changed to CGI mode and downloads succeeded, went back to FCGI mode and again they fail.

Ubuntu 10.04LTS 64bit.

Error log is clean.

Also, for giggles, try rolling back libapache2-mod-fcgid to 1:2.2-1, no change so reverted to 1:2.3.4-2ubuntu0.2

The cause may be that you are hitting some limit on the amount of data a fcgid PHP script can output. However, I don't see any Apache directive for setting such a limit in the mod_fcgid documentation..

Is the same file always cut off at exactly the same size? If not, another possible cause is hitting the limit on PHP execution time.

I thought it would be a simple case of php time limit too, so set it to 'Maximum PHP script run time Unlimited'.

File size varies, cuts off at 200+ MB, some times over 380MB. All files are archives, either Win Zip or 7zip (native 7z format).

Some users reported switching to wired connection enabled a 310MB download to succeed, almost as if there is a timeout issue but of a 'polling' nature during the transaction?

Google failed to find others similarly blighted, I appreciate this is likely not a Virtualmin issue but a FCGI one. Reverting to CGI would be a last resort, and has caused issues with IPB software (but this may be cache related).

When the download fails, does anything get logged to the domain's error log file (usually at ~/logs/error_log or /var/log/virtualmin/domain.com_error_log) ?

This is part of the strangeness. No error is logged by the server, nor by Chrome. Firefox will report connection reset though.

To add to the perplexity, I just tried the same file in FireFox and it downloaded fine, with MD5 Sum confirmed.

Granted it is now 01:30 here now so network is relatively quiet. But this fails to explain why CGI will work during busier times..

I turned on debug logging, and got the following:

[Tue May 31 11:56:04 2011] [notice] mod_fcgid: process /home/k9squad/public_html/forums/index.php(7368) exit(busy timeout), terminated by calling exit(), return code: 0 This signified a successful download.

[Tue May 31 12:04:14 2011] [warn] mod_fcgid: process 7449 graceful kill fail, sending SIGKILL [Tue May 31 12:04:20 2011] [notice] mod_fcgid: process /home/k9squad/public_html/forums/index.php(7449) exit(busy timeout), get stop signal 9 This followed a failed download of the same 480MB file.

I think this may be caused by packet loss, is there a setting I can alter that will make Apache/FCGI less susceptible?

Hmm -- try adding a BusyTimeout entry for this Virtual Server, and give it a large number.

By default, it's 300 seconds (5 minutes), which would look like this:

BusyTimeout 300

Try bumping up that "300" to a higher number... maybe 1800, for example.

If you get a syntax error trying to add the above, try using the parameter "FcgidBusyTimeout" instead of just "BusyTimeout".


Used 'FcgidBusyTimeout 1800' as suggested and have been able to download 480MB test file twice in a row without failure, many thanks again!

Did this in the Virtual Server conf, rather than system wide.