Page 1 of 1

Download "Hanging/timeout" Large Files

Posted: 14 Mar 2012, 10:09
by Alvery
Hey!

I am using Joomla 2.5 under IIS7.

The Phoca Download works excellent for small files. I published around 200 files (100kb-300kb) and there is no problem at all.

- I tried to share bigger files 300MB-600MB/each.
- I copied to the server around 50GB data.
- I set up the files in Phoca and published.
- After the 9th file the browser is hanging. I am able to download till the first 9, but after its timeout.
- The sum size of the first 9 file is around 4.3GB.
- Its not possible to download the rest of the files.

I checked it with Single Add and with Multiple Add / different browsers as well. Same result.

I checked my PHP.ini about some "download size" restrictions but I didnt find any (just for upload).

Any idea why cant I share more than around 4.3GB sum data? Did I missed some settings? Could be because cache? But then why can I start on the first 9 files?

Thank You for your help!

Have a great day!

/Akos

I checked other topics as well and I did what you suggested to others:

Created a test.php cointaining:
---------------------------------------------------------------------------------------------
<?php
function customError($errno, $errstr)
{
echo "<b>Error:</b> [$errno] $errstr<br />";
echo "Ending Script";
die();
}

set_error_handler("customError");

$fileSize = filesize("./phocadownload/Tuyet Trang San Ga - Trinh Tuan Vy.mkv");
$httpRange = 0;
$newFileSize = $fileSize - 1;
$resultLenght = (string)$fileSize;
$resultRange = "0-".$newFileSize;
if(isset($_SERVER['HTTP_RANGE']) && preg_match('%^bytes=\d*\-\d*$%', $_SERVER['HTTP_RANGE'])) {
list($a, $httpRange) = explode('=', $_SERVER['HTTP_RANGE']);
$httpRange = explode('-', $httpRange);
if(!empty($httpRange[0]) || !empty($httpRange[1])) {
$resultLenght = $fileSize - $httpRange[0] - $httpRange[1];
header("HTTP/1.1 206 Partial Content");
if(empty($httpRange[0]))
$resultRange = $resultLenght.'-'.$newFileSize;
elseif(empty($httpRange[1]))
$resultRange = $httpRange[0].'-'.$newFileSize;
else
$resultRange = $httpRange[0] . '-' . $httpRange[1];
}
}
echo "Content-Length: ". $resultLenght . "<br />";
echo "Content-Range: bytes " . $resultRange . '/' . $fileSize . "<br />";
?>
--------------------------------------------------------------------------------------------


Result:

Error: [2] filesize(): stat failed for ./phocadownload/Tuyet Trang San Ga - Trinh Tuan Vy.mkv
Ending Script

Any idea? :-)

/Akos

Re: Download "Hanging/timeout" Large Files

Posted: 19 Mar 2012, 21:33
by Jan
Hi, mostly limits are set by server.

Phoca Download only mediates information between server and browser and if you will set no limits in parameters, there are no limits set by Phoca Download. So try to recheck your server settings (for different limits, download, upload, post sizes, suhosin, etc.)

Jan