How to upload Files larger than 2GB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

 our customer has the following setup:

Apache/HTTPD(2.4.43)->mod_jk(1.2.48)->Tomcat(9.0.12).

 The application hosted by Tomcat has a REST interface that allows file upload using POST requests. The problem now is that we get a 500 response when we try to upload files larger than 2 GB. But this happens only when using the full path from Apache to Tomcat. When we try the upload directly via the Tomcat HTTP port all is good

This leaves me with the question where the problem is. Is it the Tomcat AJP part, is it mod_jk or is it HTTPD? From the logs I have the impression the file never appears on the Tomcat side.

So I found the LimitRequestBody directive for HTTPD. But the description leaves me wondering. It says "This directive specifies the number of bytes from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a request body." Means "unlimited" really no limit, or is it 2GB. Anyway, I set it to 0 with no success.

Then looking at the Tomcat configuration. The HTTP connector (working) looks like this:

    <Connector port="9695" protocol="HTTP/1.1"
               connectionTimeout="20000"
               maxPostSize="209715200"
               redirectPort="8443" />

Which makes me wonder why it works. It should bail out at 200 MB. The AJP connector looks like:

   <Connector port="9697" protocol="AJP/1.3"
                connectionTimeout="600000"
                maxPostSize="20971520000"
                maxThreads="300"
                minSpareThreads="10"
                redirectPort="8443" />

I upped the maxPostSize to 20GB, but it did not help.

Any advice is highly welcome. Just not

- Don't use HTTP for uploading large files. It is the mechanism the application offers
- Don't allow upload of large files. Unfortunately it is a valid use-case.

Thanks in advance
Martin
--
------------------------------------------------------
Martin Knoblauch
email: k n o b i AT knobisoft DOT de
www: http://www.knobisoft.de

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux