Problems uploading/deploying large WAR’s to Tomcat7?

I’ve run into this a few times as my web applications got larger. Often this has been seen when builds automated by Jenkins start failing as they increase in size. It has also occurred to me when doing manual deployments as the Jenkins WAR itself is larger than 50MB lately.

Let’s just go in and increase the maximum expected file size…

This change should work on any platform, but the following is from my experience with Ubuntu.

sudo vi /opt/tomcat7/webapps/manager/WEB-INF/web.xml

Default is:

<!-- 50MB -->

Change to something a bit larger (to your liking):

<!-- 50MB max 62428800, 100MB = 104857600 -->

Restart with either…
sudo /etc/init.d/tomcat7 restart
sudo service tomcat7 restart

Leave a Reply