Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Increase the upload limit from 2GB to 5GB

  1. #1
    Join Date
    May 2010
    Beans
    7

    Question Increase the upload limit from 2GB to 5GB

    Hi

    I'm currently running Ubuntu Server 12.04 64bit and I setup Apache 2.2 web server. I set my php.ini 'upload_max_filesize' 'post_max_size' to 5000M but when I try to upload a file with 2.8GB size I get error!

    I checked my apache error log file and I have this:
    Code:
    Invalid Content-Length, referer: http://mydomain.com/examples/
    I also google this and some people say that "You have to set LimitRequestBody 0 in httpd.conf" so I did that also but still same error.

    When I upload anything less than 2GB exact there is no problem!

    Any idea, what am I missing??

  2. #2
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,304
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Increase the upload limit from 2GB to 5GB

    What sort of filesystem are you uploading to? It isn't FAT is it?

  3. #3
    Join Date
    May 2010
    Beans
    7

    Re: Increase the upload limit from 2GB to 5GB

    it's ext4

  4. #4
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,304
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Increase the upload limit from 2GB to 5GB

    The documentation entry for LimitRequestBody says:
    This directive specifies the number of bytes from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a request body.
    It sounds like "unlimited" might mean 2GB in practice.

  5. #5
    Join Date
    Feb 2009
    Beans
    530
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Increase the upload limit from 2GB to 5GB

    Is the file you're trying to upload compressed or uncompressed?

    If it's uncompressed, try compressing it to see if you can get it below 2GB.

    If it's compressed, try using "split" on it before uploading, then piecing it back together with "cat" on the server. Zip archives can also be split by "zip" (with the s option).

  6. #6
    Join Date
    Jun 2007
    Location
    K-o-T,
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Increase the upload limit from 2GB to 5GB

    I interpreted that statement to mean that if you set the value to 0,you will get unlimited uploads.

    I could be wrong

    Good luck
    Hypertension = Take with a pinch of salt
    | Psychocats | Ubuntu Documentation | Howto [Solved] | BBcode list | Brother Website |

  7. #7
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,304
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Increase the upload limit from 2GB to 5GB

    Quote Originally Posted by plucky View Post
    I interpreted that statement to mean that if you set the value to 0,you will get unlimited uploads.

    I could be wrong
    Interesting, that is a natural way to read it. However, "unlimited" cannot possibly mean infinite. Apache cannot store a file bigger than the filespace available, for example, or larger than what is supported by the host filesystem type. The question arises why can't you specify a limit of 2.1GB or 3GB or 1TB or...?

    http://httpd.apache.org/docs/2.2/new_features_2_2.html "Large File Support. httpd is now built with support for files larger than 2GB on modern 32-bit Unix systems. Support for handling >2GB request bodies has also been added."

    Someone has successfully set a limit > 2GB, so that might be worth a try. See http://ubuntuforums.org/showthread.php?t=1385890 but then hit timeout errors.

    Is http really the ideal protocol for transferring files larger than 2GB?

  8. #8
    Join Date
    May 2010
    Beans
    7

    Lightbulb Re: Increase the upload limit from 2GB to 5GB

    Hi,

    Thanks for your replies!

    I changed the LimitRequestBody to 5368709120 (5GB) Also I install PECL Upload Progress to check the uploading progress and used their Example php files to do a test upload.

    On my Google Chrome The Upload Starts but it's saying -1% -2% -3% -4% and ....

    On Firefox I get the Connection Was reset. and no progress details!

    I don't want to compress my files that wouldn't help me.

  9. #9
    Join Date
    May 2010
    Beans
    7

    Angry Re: Increase the upload limit from 2GB to 5GB

    Someone has successfully set a limit > 2GB, so that might be worth a try. See http://ubuntuforums.org/showthread.php?t=1385890 but then hit timeout errors.
    this was the first thing I found when I googled this problem and didn't work for me!

  10. #10
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,304
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Increase the upload limit from 2GB to 5GB

    Well it could be the client that is setting an invalid length (e.g. negative) if the size is >2GB. What client are you using?

    As a diagnostic tool (not for production) you could enable the log_forensic module and configure a log file for forensic logging. This will enable you to see the content-length that is being sent by the client.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •