Recently my technicians and I encountered an issue with a hosting customer who had an interesting situation between two VPS Accounts that he owns. The first VPS had a relatively quick startup time (under a minute), and the second VPS had an extremely slow startup time (above 5 minutes). Both VM’s were relatively similar, and both served a great number of sites. The following are the two options that corrected the issue:
Set property in TOMCAT_HOME/conf/catalina.properties:
This will turn off jar scanning during the Tomcat startup.
Configure the number of concurrent threads for Tomcat to use to create new contexts by adding the “startStopThreads” attribute to the <engine> tag in the Tomcat server.xml file. The number of threads should not be higher the number of CPU cores available to your server or the threads might overlap and you probably won’t get the speed boost you were hoping for.
Once these options were implemented, both servers started up in just a few seconds.