-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Shanti,

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.

https://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html#JAR_Scanning

> I used the same logging.properties 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTPY7tAAoJEBzwKT+lPKRY/X4P/09VdkSTyuyQuKB5fDky+eFq
DzpTGRWcLWhFb+nUbIhq6k7VCxXn7UhmtLE7Gsg0XiJf6xguouaxVtuJuD/8XzXm
VFplalAWa0IH0FfhXDqPOtN08sGIY7KxsjHemt+Kfa6ApCrtDbcnK8okp9J2BJln
hXlCUwuQ+shfv4bngkdT1c7woBP/cWJsy9Y56nb2VL3mNZpDqsKg6ec2YeXOxGGT
iJiuqJiqJk6C2cA/k1qpIa56uq1xH3vzK943My9gilSVwJ9CfAqo9GRdt6uCWT9P
ryiTRh0Oss3IgnwPA3S5ysVRtEVG+g4lFT3SlCgn3O/MTI8V+mMLgJpU09qqWG2F
Efbe1VDDVaa8uJa5GoqfTGvlyJPa39t6xnJnQaSL2fOQ8qHj9BqTEzZY/BbEpgO8
gKdGn4SgVNmIf1nKAEiDx1dnpyoLZSWrT3Xy56iPMVrDQ522tsOY79xs9tjIPOjv
gaMN9yCbY8mn6kv0bAzYgHTGOrLlkcNks+4VTbRiw6I/L2TxhvXs2YkMnt8KZfFt
0b2emzcXPXwRV5wXsy+5dpHi1qYuylaWrZv2skkQQqpXUEebQVMx2yznAQiJEB3a
W9GyEyScrdzHBZQuR1uUlV7DCXq3VKDmxtBA1Ti/bwfns1l5oSa3E2nnnF7RVW47
IXOtJRE9sz2iegTy3ld/
=5gve
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to