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
<!-- 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
Shortly after I automated code deployments in my Tomcat7 development testing environment, I found that some larger builds began failing with the following error:
org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (...) exceeds the configured maximum (62428800)
After a little digging, I found that the WAR files were exceeding the default maximum upload size, thankfully, this is trivial to increase.
sudo vi /usr/share/tomcat7-admin/manager/WEB-INF/web.xml
(Change 52428800 to a larger number, perhaps doubled like 104857600)
<!-- 50MB max = 52428800 (100MB = 104857600) -->
There eventually comes a time when you’re not satisfied with the “latest” version of some software, often this is due to increased resources required to run on older machines. Sometimes it can be due to ‘free’ software becoming nag-ware or no longer free.
Here are a few websites that I have found useful when looking for such older software.
Obvious Warning – older software may have security concerns and known bugs… as such, be careful when using them!