Hi Chris, Thanks you for the note!
On Thu, Apr 3, 2014 at 12:40 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Shanti, > > > They work the same way. Are you launching them differently for > different versions? > Yes, actually. The logging.properties file and the catalina.properties file are the same. The JVM arguments are the same as well between the two versions. But I am using Executor ThreadPool in 7.0.52. Let me revert to not using an Executor ThreadPool and see what goes on. > > > > At some point, Tomcat was modified to adhere to some rulings made by > the Servlet EG about JAR-scanning and other (unfortunately) > time-consuming operations. You can speed-up Tomcat startup by using > metadata-complete="true" in your web.xml, and configuring the various > JAR-scanning options. > > > https://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html#JAR_Scanning > Please see your comment below. If your context is not deployed, then your web application will not > respond to requests. Are you sure you don't want it deployed? > > I mean, why does 7.0.23 not take forever to deploy these same 136 contexts while 7.0.52 does? If I could only see where the output of 7.0.23 goes, I'll know better. I don't see any swallowOutput on the Default context. So I am unsure what's going on with 7.0.23. I only see "[Unloading class.." messages because of the " -XX:+ClassUnloading" JVM argument. That is a very long time. Can you take some thread dumps during the > process. You certainly have a long time for that opportunity. > > Yes! Good point! Should have thought of that. > > (2) Catalina.out messages: > > > > v7.0.23 catalina.out is empty. > > How do you launch Tomcat 7.0.23? > > Through /bin/service which invokes a start_tomcat script which invokes the startup.sh Tomcat script. > So Tomcat is deploying context_136 which is presumably your web > application. Why does your web application take so long to launch? > Tomcat deploys 136 contexts. Each context is a website. Takes about 5-6 seconds to deploy each context. Now 7.023 is pretty quick. I'll compare thread dumps between the two startups. Unless you can think of something else that could prevent startup messages not showing up in 7.0.23's catalina.out. BTW, the startup messages go nowhere in 7.0.23. > > So you want Tomcat to come up immediately without any applications > available? That's no fun. > > I agree :-) But that's not what I meant. I didn't want context to be deployed if I can save their meta-data somehow from the previous run of Tomcat which the server can reuse. > > I don't think JARs are scanned in 7.0.52 for things to slow down so > > much. > > Are you sure? Take thread dumps. > Yes, I will do so. > > > Not sure if "metadata-complete=true" will help here. Running all > > the FIleHandlers in FINEST mode shows nothing while contexts are > > being deployed. > > Then you have done something wrong. When I set level=FINEST, I get so > much logging it noticeably slows down the startup of my Tomcat instance. > > > Hmm.. > > How long does Tomcat take to launch if you have no web applications? > INFO: Server startup in 1454 ms Well, the executor threadpool is a suspect. Let me work in making 7.0.52 like 7.0.23 in all respects, take thread dumps and then check things out. Please let me know if the Executor threadpool can be slow. And, in the meantime, also how I might make catalina.out talk in 7.0.23. I know I am doing something silly but I can't seem to figure this one out. Thanks! -Shanti