1. Home
  2. Troubleshooting
  3. FileUploadBase$SizeLimitExceededException

FileUploadBase$SizeLimitExceededException

Issue

Deployment using Tomcat Manager GUI fails. The errors below are found in Tomcat logs.

21-Oct-2018 03:24:44.777 SEVERE [http-nio-8080-exec-4] org.apache.catalina.core.ApplicationContext.log HTMLManager: FAIL - Deploy Upload Failed, Exception: [org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (53387372) exceeds the configured maximum (52428800)]
 java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (53387372) exceeds the configured maximum (52428800)o

Solution

Increase the file upload limit.

Out of box, Tomcat Manager allows files upto 50MB in size. Increase multipart-config to be able to deploy our WARfile.

# Edit web.xml to increase the max-file-size & max-request-size from 50MB to 200MB                                        
> sudo vi /opt/apache-tomcat-8.5.34/webapps/manager/WEB-INF/web.xml

    <multipart-config>
      <!-- 50MB to 200MB -->
      <max-file-size>209715200</max-file-size>
      <max-request-size>209715200</max-request-size>
      <file-size-threshold>0</file-size-threshold>
    </multipart-config>

Updated on March 10, 2019

Related Articles