Downloads Stopping Early

Just installed Virtualmin/Webmin on a fresh install of Centos 5. Everything went smoothly, but whenever a file is downloaded via HTTP, it freezes at a certain percentage for a minute or two and then stops.

The error log shows the same error whenever it happens:

[Sun May 13 14:15:53 2012] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error
[Sun May 13 14:15:53 2012] [warn] (104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request function

When you’re downloading the file, are you accessing it directly, or are you accessing something like a PHP script, which is transferring the file to you?

If you’re accessing a PHP script, it may mean we have to tweak some PHP settings (such as the timeout).

-Eric

It’s a PHP script, but I already increased the limits beforehand.

I’ve attached a copy of php.ini and httpd.conf in .txt format.

Howdy,

When using FCGID, there’s additional things you may need to tweak in order to extend the timeout.

My recommendation would be to go into Server Configuration -> Website Options, and set “Maximum PHP script run time” in there.

If that doesn’t work, you may want to try changing the PHP Execution Mode from FCGID to CGI.

-Eric

Thanks for the reply.

The ‘Maximum PHP script run time’ was already set to 36000.

I’ve now switched from FCGID to CGI, but I keep getting the following error whenever I click a URL on the site:

The requested URL /php5.cgi was not found on this server.

EDIT: the above error seems to be site specific. It only occurs when using a site based on the Invision Power forum software. My vBulletin based site doesn’t show the same errors.

Are you by chance using PHP 5.3? That can happen when software isn’t properly working with PHP 5.3.

If so, you may want to try editing $HOME/etc/php.ini, and set cgi.fix_pathinfo to 0.

-Eric

PHP version is: 5.2.17

Ah, that PHP version can have that issue too.

I’d suggest trying that php.ini tweak, reloading the page, and see if you continue to have that problem.

-Eric

you may also want to check the Invision Power forum software configuration if it contains limits… some forum software do

Still the same problem :frowning:

I tried running the site under mod_php, but now the I get another error:

[Mon May 14 17:59:35 2012] [error] [client 94.15.72.149] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 42 bytes)

I found php_value memory_limit 32M in /etc/httpd/conf/httpd.conf and changed it to 999M, but the same error occurs.

Is there anywhere else a 32M limit would be?

You may want to take a look at /etc/php.ini, I believe that’s the PHP config that would be used when mod_php is in use.

Make sure you restart Apache after making changes in there.

-Eric

Thanks, I’ll give that a try.

Well, that worked!

I’ll just leave it running mod_php.

Thanks very much for the help, much appreciated.