Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7CC3B10792 for ; Thu, 3 Apr 2014 16:40:51 +0000 (UTC) Received: (qmail 94125 invoked by uid 500); 3 Apr 2014 16:40:46 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 94071 invoked by uid 500); 3 Apr 2014 16:40:45 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 94062 invoked by uid 99); 3 Apr 2014 16:40:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2014 16:40:45 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [76.96.62.64] (HELO qmta07.westchester.pa.mail.comcast.net) (76.96.62.64) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2014 16:40:39 +0000 Received: from omta10.westchester.pa.mail.comcast.net ([76.96.62.28]) by qmta07.westchester.pa.mail.comcast.net with comcast id lSqW1n0050cZkys57UgHWx; Thu, 03 Apr 2014 16:40:17 +0000 Received: from Christophers-MacBook-Pro.local ([68.55.8.89]) by omta10.westchester.pa.mail.comcast.net with comcast id lUgG1n00h1vFKdg3WUgGE0; Thu, 03 Apr 2014 16:40:16 +0000 Message-ID: <533D8EF0.5020005@christopherschultz.net> Date: Thu, 03 Apr 2014 12:40:16 -0400 From: Christopher Schultz User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: catalina.out anomaly? References: In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1396543217; bh=gcWpUtGcEYpSz5GSDERQnxKvEs8s/7rDheMz9d5yb2w=; h=Received:Received:Message-ID:Date:From:MIME-Version:To:Subject: Content-Type; b=F1fV9LrmBHoohardaSkq1fU27BYt75u3rbUH4RLjJ5iqQqXfotCfE8SUxPni1xEjL 3dQpmO8hiV9L7JWXTYLW9yePtmBCFrPqhQ5umAlSu3R90Al+VuLrOi0kcFA8AOS5mG aDOVVZ+cSRKcj0lscAPYT9PygLJqVr9jualUELg4N5NBW0mK4JQwgaHwpMoBnxMnZv ZRZy+GHZOzU7A4xA2tN2OYztQPwcXYlDIIXuG8EegvwJuP+jh6xecXN6xVcHU7imZo d9GSu5fDhMP0/FsD3G3HXKBAzHwM8P9yhlJAZxLX2wQGy4dvRDDUBlMoAmwYN9tCOk nHqAWB0LXoKlA== X-Virus-Checked: Checked by ClamAV on apache.org -----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-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org