Attaching a File Results in Request Entity Too Large
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