Help - Search - Members - Calendar
Full Version: Apache Handling Large Files (2.5GB)
The Planet Forums > System Administration > Web Hosting
TheUniverses
I'm having an issue downloading a 2.5GB file off my server. Apache gives a 403 Forbidden and I have checked the file permissions.

-rw-r--r-- 2.5G Sep 3 17:22

Is this a limiation of apache and is there anyone to get apache to work this a file this big? Its the VistaRC1 iso by the way, the last I dl'ed beta2, I resorted to using SCP instead.

Thanks in advance.
Blue|Fusion
AFAIK, Apache does have issues with files greater than 2GB. I have yet to look into it, but we did have a similar issue when trying to move a large tarball from one server to another. Had to resort to rsync.
TheUniverses
Yea, resorted to using Lightty.
Apache is a POS. I wish Plesk supported lighty.
xenneo
last time i had to move a large file (bigger than 2 gb), i used scp icon_smile.gif
klaude
Same here. In fact we have to break up some game files on the Cortex update server so they're smaller than 2G.
X-Istence
On my home network I have apache serving up mp4 files containing movies ripped from DVD's, and they are usally around 2 - 4 GB big and Apache serves them up with no trouble at all.

According to reports at Apache.org this was a bug that was fixed.

If you can, get the headers when you try to connect and download the file, use curl if need be. Then look for the content-length field. If it has wrapped around (is negative) then it is not fixed.
TheUniverses
http://www.theuniverses.com/vistadownload/...cfre_en_dvd.iso

GET /vistadownload/vista_5600.16384.060829-2230_x86fre_client-lr1cfre_en_dvd.iso HTTP/1.1
Host: www.theuniverses.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.x 403 Forbidden
Date: Thu, 07 Sep 2006 22:55:59 GMT
Server: Server
Content-Length: 396
Keep-Alive: timeout=12, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
----------------------------------------------------------

That is from Live HTTP Headers plugin in FF.
It works fine with lighttpd though.

http://www.theuniverses.com:****/vista_****.iso

GET /vista****.iso HTTP/1.1
Host: www.theuniverses.com:****
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.x 200 OK
Content-Type: application/octet-stream
Etag: "103254325"
Accept-Ranges: bytes
Last-Modified: Sun, 03 Sep 2006 17:22:44 GMT
Content-Length: 2709782528
Date: Thu, 07 Sep 2006 22:59:18 GMT
Server: lighttpd/1.4.11
----------------------------------------------------------
TheUniverses
Did they fix this problem in Apache 2.2.x?

QUOTE (xenneo)
last time i had to move a large file (bigger than 2 gb), i used scp icon_smile.gif


Well, a bunch of my friends wanted it and I don't exactly want to give them SSH access.
kfukasawa
One option would be to break the file up with the 'split' command.
X-Istence
QUOTE (jester)
Content-Length: 396

It works fine with lighttpd though.

Content-Length: 2709782528


There is your reason. Apache's counter has wrapped around, as in it was at 2 GB + some other arbitrary amount, and then the file was even bigger.

As you can see, lighttpd does the right thing.

CODE
[Breached: ~]$ curl -I http://films.network.home/Troy.mp4

HTTP/1.1 200 OK

Date: Fri, 08 Sep 2006 00:17:41 GMT

Server: Apache/2.2.0 (FreeBSD) mod_ssl/2.2.0

Last-Modified: Sat, 25 Jun 2005 04:49:13 GMT

ETag: "d96c23-9e6df98f-a3d66440"

Accept-Ranges: bytes

Content-Length: 2658007439

Content-Type: text/plain


Does not wrap.

Now, just because it seems my file is a bit smaller than yours, I have decided why not take a real test and make a 4 GB file.

CODE
[Breached: /usr/media/Films]$ curl -I http://films.network.home/test.file

HTTP/1.1 200 OK

Date: Fri, 08 Sep 2006 00:23:19 GMT

Server: Apache/2.2.0 (FreeBSD) mod_ssl/2.2.0

Last-Modified: Fri, 08 Sep 2006 00:22:22 GMT

ETag: "d96c11-0-33aeeb80"

Accept-Ranges: bytes

Content-Length: 4294967296

Content-Type: text/plain



[Breached: /usr/media/Films]$ ls -lah test.file

-rw-r--r--  1 xistence  xistence   4.0G Sep  7 20:22 test.file


4 294 967 296 bytes = 4 gigabytes

According to Google.
TheUniverses
Lightty still rocks though, but its good that Apache has addressed that issue.
X-Istence
QUOTE (jester)
Lightty still rocks though, but its good that Apache has addressed that issue.


Agreed. I was just merely providing evidence the issue has been fixed.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.