The Problem
You may encounter a request to increase the file download size limit in Apache server.
Attempting to call a URL to upload a file, the following error occurs in Browser:
ERROR Request entity too large. Request exceeds the capacity limit
Apache error_log has the following error:
Request content-length of 294135 is larger than the configured limit of 262144
The Solution
The file download size limit is controlled by the Apache directive “LimitRequestBody“.
By default, it is not set, which means unlimited or virtually no limit in the POST requests. If the directive is set to a specific size, then exceeding that size will produce an error similar to the one above.
For a more detailed description of this directive, see the following Apache documentation:
http://httpd.apache.org/docs/1.3/mod/core.html#limitrequestbody
To modify this setting:
1. Edit the httpd.conf file and set the directive to the desired value. For example, to set the value for 5MB you would use something like this:
LimitRequestBody 5120000
Or:
2. Edit the httpd.conf file and remove or comment out the directive:
#LimitRequestBody 262144