Today while deploying a war file (development site code) in Tomcat 8, I faced the following issue regarding upload limit size in Apache Tomcat server. So I decided to increase limit Tomcat upload file size limit to higher than the default. The default upload limit is set to 50 MB.
Increasing Upload Size Limit
You can increase the Tomcat server upload file size limit by the editing webapps/manager/WEB-INF/web.xml configuration file and searching for the below content.
cd /path/to/tomcat vim webapps/manager/WEB-INF/web.xml
52428800</max-file-size> <max-request-size> 52428800</max-request-size> <file-size-threshold>0</file-size-threshold> </multipart-config>
Also, see the below screenshot.
Edit max-file-size and max-request-size and increase it as your requirement. These values are defined in bytes and the default value is set to 50 MB. You can set the following value for-
- 100 MB => 104857600
- 200 MB => 209715200
Save the file and restart the Tomcat server to reload the changed settings.