Today while deploying a war file (development site code) in Tomcat 8, I faced 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.
Increase Tomcat Upload File Size Limit
You can increase Tomcat server upload file size limit by the editing webapps/manager/WEB-INF/web.xml configuration file and search 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>
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 following value for-
- 100 MB => 104857600
- 200 MB => 209715200
Save the file and restart the Tomcat server to reload the changed settings.