Attaching a File Results in Request Entity Too Large
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Symptoms
Attempting to attach a file results in:
HTTP logs contain:
HTTP/1.1 413 Request Entity Too Large
Diagnosis
System is behind some sort of proxy, firewall or network security
Cause
The network security/proxy has a limitation on request size
NGINX USERS: If you have not specified a size limitation, NGINX will set client_max_body_size to a default of 1MB. See http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size.
Resolution
Increase the allowed request body limit for the proxy. For example:
- Apache - http://httpd.apache.org/docs/current/mod/core.html#limitrequestbody
- Nginx:
modify the configuration file and reload:
$ vi /usr/local/nginx/conf/nginx.conf
modify the follow parameter to increase the size:
client_max_body_size 1M
reload the webserver
$ /usr/local/nginx/sbin/nginx -s reload