Large WAR file cannot be deployed in Tomcat 7

Problem

When uploading a WAR file larger than 50 MB, the Tomcat 7 Manager application reports:

The server encountered an internal error () that prevented it from fulfilling this request.

Exception java.lang.IllegalStateException:

org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException:

the request was rejected because its size (XXX) exceeds the configured maximum (52428800)

Solution

  • Go to the web.xml of the manager application (for instance it could be under /tomcat7/webapps/manager/WEB-INF/web.xml.
  • Increase the max-file-size and max-request-size:

<multipart-config>

<!– 50MB max –>

<max-file-size>52428800</max-file-size>

<max-request-size>52428800</max-request-size>

<file-size-threshold>0</file-size-threshold>

</multipart-config>

 

Resources

Mail List “The request was rejected because its size (102811565) exceeds the configured maximum (52428800)”

Mail List “Can’t upload large war to Tomcat 7, worked in Tomcat 6”

27 thoughts on “Large WAR file cannot be deployed in Tomcat 7

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s