Downloads Stopping Early

13 posts / 0 new
Last post
#1 Mon, 05/14/2012 - 05:01
Mobius1

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

Mon, 05/14/2012 - 08:21
andreychek

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

Mon, 05/14/2012 - 08:47
Mobius1

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.

Mon, 05/14/2012 - 09:05
andreychek

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

Mon, 05/14/2012 - 09:22
Mobius1

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.

Mon, 05/14/2012 - 10:07
andreychek

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

Mon, 05/14/2012 - 10:14
Mobius1

PHP version is: 5.2.17

Mon, 05/14/2012 - 11:48
andreychek

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

Mon, 05/14/2012 - 11:59
ronald
ronald's picture

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

Mon, 05/14/2012 - 12:05
Mobius1

Still the same problem :(

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?

Mon, 05/14/2012 - 14:04
andreychek

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

Mon, 05/14/2012 - 14:31
Mobius1

Thanks, I'll give that a try.

Mon, 05/14/2012 - 18:18
Mobius1

Well, that worked!

I'll just leave it running mod_php.

Thanks very much for the help, much appreciated.

Topic locked