Large File Uploads with Alfresco Fronted by IIS

Gary Cox

July 1, 2015

Although the Tomcat instance running Alfresco can be accessed directly, many of our clients prefer to front Tomcat with a web server such as Apache or IIS. Recently, we noticed a problem when uploading large files to Alfresco Share when fronted by IIS. Small file uploads worked fine; however, large files would fail on upload using the upload dialog. There were two configuration settings that required changing to allow for upload of these larger files.

In this environment, IIS 8.0.x was installed with the following add-ons to handle rewriting requests to be handled by Tomcat/Alfresco:

URL Rewrite 2.0

Microsoft Application Request Routing (ARR) v2.5

IIS was configured with an SSL certificate and was accessed via HTTPS. However, the issue with large file uploads was also seen when IIS was accessed via HTTP.

The issue that was encountered was that small files could be uploaded to Alfresco Share without any issues. However, files that took over 2 minutes to upload would fail. For reference, a screen shot of the Alfresco Share Upload screen is provided below (click on the image to expand if needed):

Alfresco Share Upload Dialog

Because the failures looked to be due to the upload time required, and not due to the file size directly, we were able to quickly track down a timeout setting that was causing the issue. By default, the “Connection Time-Out” setting for the “Default Web Site” is set to 120 seconds. When large files were uploaded from the Upload menu, this timeout was exceeded. We changed this setting from 120 seconds to 2400 seconds, and we no longer saw failures due to the timeout value.

To make this change, from the IIS Manager, perform the following steps:

Select the “Default Web Site” in the left frame of the Manager

Select “Limits…” from the right frame. This will bring up the “Edit Website Limits” dialog.

Under “Connection Limits” in the “Edit Website Limits” dialog, the value of “Connection time-out (in seconds)” can be increased as needed.

An example is provided below (click on the image to expand if needed):

Default Web Site Connection Timeout

Although this resolved the time-out issue, large file uploads were still failing at the very end of the actual upload to Alfresco. The root cause of this was another limit setting. This time the setting was related to a Request Filtering setting. By default, Request Filtering has a setting that limits content length to 30 MB. This setting was changed to the maximum expected file upload size to Alfresco (500 MB). Once this setting was in place, large file uploads to Alfresco worked as expected.

Request Filtering can be configured from the “Default Web Site”. Perform the following steps to change this setting:

Select “Default Web Site” from the left panel in IIS Manager

Right-click on the “Request Filtering” icon from the Default Web Site Home screen and select “Open Feature”

From the “Actions” panel on the right side of the screen, select “Edit Feature Settings…”

Under the “Request Limits” section of the “Edit Request Filtering Settings” dialog, modify the setting of “Maximum allowed content length (Bytes)” as needed. NOTE: This setting is in BYTES, not kilobytes or megabytes!

The examples below provide an example for changing this setting (click on the images to expand if needed):

Request Filtering 1

Request Filtering 2

Request Filtering 3

Once those two configuration changes were made, large files could be uploaded from to Alfresco Share via the Upload dialog.