Tomcat taking too much time to start
You can find out which library consumes the time. When the server is being started in a debug mode, pause its thread several times and examine stacktraces. There may be possibly some library that populates its Spring application context, weaves advised objects, initializes file storage, whatever. If so, you will see it from stacktraces.
I know this post is old, even i wanted to share few check points on this because these are irrespective of tomcat version...
I was facing the same issue and i followed below steps and now my server is starting with in 130 ms.
- First verify the console if you are using any IDE, there you can find time in milliseconds for each application. So you will come to know which one is taking long time.
- To make sure, your finding is correct just remove that app from 'webapps' folder and start tomcat again.
- Remove the default applications which you don't need. Usually we only use tomcat manager, so just keep manager app and remove other applications from 'webapps' folder
- Make sure 'temp' folder is empty
- Clean up the older log files. And don't write your application log files in server folder.
- Start the server first and deploy the file later. So that you don't face timeout error.
This is what i tried any succeed.