tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: catalina.out anomaly?
Date Thu, 03 Apr 2014 16:40:16 GMT
Hash: SHA256


On 4/3/14, 12:19 PM, Shanti Suresh wrote:
> I am unable to understand how Tomcat v7.0.23 suppresses startup
> messages in catalina.out and Tomcat v7.0.52 displays them all in
> catalina.out.

They work the same way. Are you launching them differently for
different versions?

> Also Tomcat 7.0.23 starts up much faster than Tomcat v7.0.52.
> Contexts are served immediately upon a v7.0.23 restart.

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.

> I used the same file from 7.0.23 into 7.0.52.  I
> would like to avoid the context being redeployed every time v7.0.52
> starts up.

If your context is not deployed, then your web application will not
respond to requests. Are you sure you don't want it deployed?

> Here are some details:
> (1) Startup Times: ------------------------
> v7.0.23 starts up in a couple of minutes at most (can't see exact
> times as they are not captured in catalina.out)

They should be.

> v7.0.52 starts up in 479924 ms  <--  so so long!

That is a very long time. Can you take some thread dumps during the
process. You certainly have a long time for that opportunity.

> (2) Catalina.out messages:
> v7.0.23 catalina.out is empty.

How do you launch Tomcat 7.0.23?

> ------------------------------------ ----------v7.0.52 catalina.out
> snippet:----------- Apr 3, 2014 9:07:24 AM
> org.apache.catalina.startup.HostConfig deployDescriptor INFO:
> Deploying configuration descriptor 
> /opt/tomcat/delivery/apache-tomcat-7.0.52/conf/Catalina/localhost/context_1.xml
Apr 3, 2014 9:07:28 AM org.apache.catalina.startup.HostConfig
> deployDescriptor INFO: Deploying configuration descriptor 
> /opt/tomcat/delivery/apache-tomcat-7.0.52/conf/Catalina/localhost/context_2.xml
> Apr 3, 2014 9:07:31 AM org.apache.catalina.startup.HostConfig 
> deployDescriptor INFO: Deploying configuration descriptor 
> /opt/tomcat/delivery/apache-tomcat-7.0.52/conf/Catalina/localhost/context_136.xml

So Tomcat is deploying context_136 which is presumably your web
application. Why does your web application take so long to launch?

> Apr 3, 2014 9:15:04 AM org.apache.catalina.startup.Catalina start 
> INFO: Server startup in 479924 ms ----------end of v7.0.52
> catalina.out snippet:-----------
> (3) Contexts after a restart: ------------------------------------ 
> After a restart, the contexts load up right away with v7.0.23
> rather than a "Service Temporarily Unavailable" as in 7.0.52.
> (4) My Questions are: ------------------------------ a.)  How can I
> prevent contexts from being redeployed?  I have 136 contexts under
> /opt/tomcat/apache/conf/Catalina/localhost/ and these are deployed 
> every time I restart v7.0.52

So you want Tomcat to come up immediately without any applications
available? That's no fun.

> I don't think JARs are scanned in 7.0.52 for things to slow down so
> much.

Are you sure? Take thread dumps.

> 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.

> But I can see time being spent as each context is deployed.
> b) I want to speed up the startup times in v7.0.52 drastically.

How long does Tomcat take to launch if you have no web applications?

- -chris
Version: GnuPG v1
Comment: GPGTools -
Comment: Using GnuPG with Thunderbird -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message