Search code examples
htmlformsiisuploadcoldfusion

Why are large file uploads working only under specific circumstances?


I'm trying to increase the maximum file size to 500 MB for uploads on an application on my ColdFusion server. I've made ColdFusion administration and IIS changes, but when I upload a 437 MB .zip file and submit the form, the page displays only "The page was not displayed because the request entity is too large."

These are the changes I've made:

  • In ColdFusion administration, increased the value of “Maximum size of post data” from 150 MB to 500 MB
  • In ColdFusion administration, increased the value of “Request Throttle Memory” from 200 MB to 550 MB
  • In IIS, increased the value of “Maximum allowed content length” for “Default Web Site” from 30000000 Bytes to 576716800 Bytes (550 MB)
  • In IIS, increased the value of “Maximum allowed content length” for “myApplication” from 30000000 Bytes to 576716800 Bytes
  • In IIS, increased the value of “uploadReadAheadSize” for “Default Web Site” from 49152 Bytes to 576716800 Bytes
  • In IIS, increased the value of “uploadReadAheadSize” for “myApplication” from 49152 Bytes to 576716800 Bytes

The changes above have not resolved the issue. Uploading a large file (such as the 437 MB .zip file) does work, however, if all of the following conditions are met:

  1. The form for uploading the file is located in the application’s “index.cfm” file
  2. The form submits to the web page it’s located in (by using <form action="", for example) rather than to some other page
  3. The URL is pointing at the root of the application (such as https://www.myserver.com/myApplication/, but if I change the URL from the root to https://www.myserver.com/myApplication/index.cfm and try the upload, it fails even though these two URLs are functionally similar if not identical)

Solution

  • It turns out the solution to this issue hinged on Jakarta, the virtual file system. I recently enabled detailed IIS logging and then tried a large file upload. The upload failed, but in the ensuing detailed error page was a URL containing a directory called "jakarta." In the Connections pane in IIS under "Default Web Site" is a directory called "jakarta." For this "jakarta" directory I decided to increase "Maximum allowed content length (Bytes)" under Request Filtering to 550 MB, which resolved the problem.

    In summary, these were the only changes needed to allow large file uploads to work without having to adhere to the specific conditions I outlined in my original post (any other IIS values I mentioned earlier I set back to default):

    • In IIS, increased the value of "Maximum allowed content length (Bytes)" for "myApplication" to 550 MB
    • In IIS, increased the value of "Maximum allowed content length (Bytes)" for "jakarta" to 550 MB
    • In ColdFusion administration, increased the value of “Maximum size of post data” to 500 MB
    • In ColdFusion administration, increased the value of “Request Throttle Memory” to 550 MB

    Thank you to everyone who responded!