Unable to upload large attachment even when attachment file size limit exceeds it
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
The content on this page relates to platforms which are not supported. Consequently, Atlassian Support cannot guarantee providing any support for it. Please be aware that this material is provided for your information only and using it is done so at your own risk.
Problem
Users receives a "Internal Error" message when uploading large attachments even though the attachment size limit had been set appropriately in JIRA. Although the upload failed, there is no useful information or error that can be found inside the logs.
Diagnosis
Generate a HAR file on the user side while replicating the issue. Search for the POST entry related to the file attachment. The POST data is incomplete and the server response code is "0".
The logs and HAR file also indicates that JIRA instance is configured behind a proxy. A simple telnet test to the JIRA instance hostname reveals that the JIRA instance is behind Microsoft IIS webserver.
HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Wed, 09 Mar 2016 06:18:44 GMT
Connection: close
Content-Length: 326
Cause
Microsoft IIS webserver "maxAllowedContentLength" is set below JIRA's attachment size limit.
Resolution
Change the "maxAllowedContentLength" in web.config to match or exceed JIRA's attachment size limit. For example:
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="10000000" />
</requestFiltering>
</security>
<system.webServer>