Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1D41A200D44 for ; Mon, 20 Nov 2017 15:22:57 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 1B99F160C0D; Mon, 20 Nov 2017 14:22:57 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3DECF160BEC for ; Mon, 20 Nov 2017 15:22:56 +0100 (CET) Received: (qmail 69467 invoked by uid 500); 20 Nov 2017 14:22:54 -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 69456 invoked by uid 99); 20 Nov 2017 14:22:54 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Nov 2017 14:22:54 +0000 Received: from Christophers-MacBook-Pro.local (pool-173-66-116-184.washdc.fios.verizon.net [173.66.116.184]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id B7D4A1A0140 for ; Mon, 20 Nov 2017 14:22:53 +0000 (UTC) Subject: Re: [OT] Skip resource path in TLD scanner? To: users@tomcat.apache.org References: <1a242fe6-77a6-9b85-995e-f2cce8709015@apache.org> <54425a34-d02b-0023-ae18-bbc2df2087c1@apache.org> <322b3a80-af31-b0d9-8426-0a9d50a1241c@christopherschultz.net> <1789953850.446014.1510947567072@mail.yahoo.com> From: Christopher Schultz Message-ID: <14656984-1b86-2d56-311b-5e5214ee01be@christopherschultz.net> Date: Mon, 20 Nov 2017 09:22:51 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit archived-at: Mon, 20 Nov 2017 14:22:57 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Alex, On 11/18/17 8:30 AM, Alex O'Ree wrote: > I'm having similar issues after updating from tomcat7 to tomcat8.5. > The build script for my app adds some sql drivers to tomcat's lib > folder, specifically the derby driver. On bootup tomcat logs a ton > of error messages saying that it couldn't find (what looks to be) > internationalized resource files for derby, which aren't present. Please start another thread and we can probably help you with that. It likely has nothing to do with Tomcat, though. - -chris > On Fri, Nov 17, 2017 at 2:39 PM, Ray Holme > wrote: > >> I use JSP and there are taglibs used. But you can cut the scan >> time way down by not scanning any libraries that don't have TLDs >> (nested files with name => .tld) You can find this by using "jar >> t" or "unzip -l" on each library (thanks Chris). >> >> If you are a Unix (Linux or MAC) user you may cheat a little by >> using the script attached. You may put any all .jar files in >> .../apache/lib or .../apache/webapps/*/WEB-INF/lib into the >> .../apache/conf/catalina.properties file if they do not have >> taglibs. So 90% of what I need does not have taglibs (just >> jstl-impl-...jar DOES and must be left out of the DO NO SCAN >> line. This took my startup time from a couple minutes to under a >> second. >> >> Best of luck. >> >> >> On Friday, November 17, 2017 1:26 PM, Christopher Schultz < >> chris@christopherschultz.net> wrote: >> >> > Matt, > > On 11/16/17 12:11 PM, Matt Cosentino wrote: >>>> This keeps getting worse, my site was down for over a minute >>>> while the TLD scanner ran. There must be something I can do. > If you need taglibs, you'll need to do TLS scanning. There really > is no way to avoid that that I know of. One of many reasons I don't > like JSP as a technology. > > If you are having a problem with downtime, you have other options > that might help in other areas. For example, you could set up a > second server and load-balance between the two of them. This > protects you from a number of downtime-causing issues such as power > failures, JVM crashes, and -- as in your example here -- planned > maintenance. > > Running a single instance of your application in a production > environment where uptime matters is really not an appropriate > solution. If you had two servers, your application's restart time > would not have been an issue. > > -chris > >>>> -----Original Message----- From: Mark Thomas >>>> [mailto:markt@apache.org] Sent: Saturday, April 29, 2017 5:02 >>>> AM To: Tomcat Users List Subject: >>>> Re: Skip resource path in TLD scanner? >>>> >>>> On 28/04/17 17:00, Matt Cosentino wrote: >>>>> Yes, it's other folders within WEB-INF. I turned on the >>>>> TldScanner logging and it is definitely what is causing >>>>> the delay. My situation probably isn't very typical. The >>>>> delay varies in my various web applications, the worst >>>>> being about 20 seconds. It all adds up though, and every >>>>> second counts when our sites are down. >>>> >>>> There is a solution available but it is intended more for >>>> the embedded use case rather than a standard Tomcat install. >>>> Using it in a standard install would require (effectively) >>>> patching Tomcat. >>>> >>>> The general idea would be to use the TldPreScanned class. >>>> That does require all the TLDs to be listed in advance. On >>>> the plus side, no scanning delay. On the down side, adding >>>> TLDs requires code changes. Doing this with a standard Tomcat >>>> install requires changes to the JasperInitializer (hence the >>>> patch). I don't think there is a pure config way around that >>>> but I'll look into it. >>>> >>>> A better solution would probably be to make it easier to >>>> plugin in a custom TLDScanner - i.e. purely with config. If >>>> you'd like us to explore this option we should re-open 61052 >>>> and adjust accordingly. I don't think there is enough demand >>>> for filtering resource paths to make that worth >>>> implementing. >>>> >>>> One final thought. Are you running the web application from a >>>> WAR or an expanded directory? (The latter would be faster). >>>> >>>> Mark >>>> >>>> >>>> >>>>> >>>>> - Matt >>>>> >>>>> >>>>> -----Original Message----- From: Mark Thomas >>>>> [mailto:markt@apache.org] Sent: Friday, April 28, 2017 7:28 >>>>> AM To: Tomcat Users List Subject: >>>>> Re: Skip resource path in TLD scanner? >>>>> >>>>> On 27/04/17 23:39, Matt Cosentino wrote: >>>>>> https://tomcat.apache.org/tomcat-8.0-doc/config/systemprops.html >>>>>> >>>>>> >>>>>> > >>>>>> There is one for skipping jar files: >>>>>> >>>>>> tomcat.util.scan.StandardJarScanFilter.jarsToSkip >>>>> >>>>> >>>>> >>>>>> It skips /WEB-INF/classes/ and /WEB-INF/lib/, but it does >>>>>> not check any property to skip user defined paths. >>>>> >>>>> Is it other paths within WEB-INF you need to skip? >>>>> >>>>> When I read "skipping resource paths" I was thinking of >>>>> skipping the various places where Tomcat treat directories >>>>> as JARs that then get scanned for TLDs (which can be >>>>> configured via the JarScanner). But it sounds like skipping >>>>> those won't help you. >>>>> >>>>> How sure are you that it is checking the directories below >>>>> WEB-INF that is the cause of the delay? That isn't a >>>>> typical source of start-up delay although it is certainly >>>>> possible. >>>>> >>>>> Finally, what sort of delay are we talking out here? >>>>> Seconds? Minutes? >>>>> >>>>> Mark >>>>> >>>>> >>>>>> -----Original Message----- From: Mark Thomas >>>>>> [mailto:markt@apache.org] Sent: Thursday, April 27, 2017 >>>>>> 5:05 PM To: Tomcat Users List >>>>>> Subject: Re: Skip resource path in TLD scanner? >>>>>> >>>>>> On 27/04/17 21:17, Matt Cosentino wrote: >>>>>>> I need to skip some of the resource paths within >>>>>>> WEB-INF. I know there's a property for skipping jar >>>>>>> files, but I couldn't find one for resource paths. I >>>>>>> reported this as a bug and was told that the property >>>>>>> exists. Where is it? >>>>>> >>>>>> Where have you looked? >>>>>> >>>>>> Mark >>>>> >>>>> ------------------------------------------------------------------ - --- >>>>> >>>>> >>>> >>>>> > >>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>>> For additional commands, e-mail: >>>>> users-help@tomcat.apache.org >>>>> >>>>> >>>>> ------------------------------------------------------------------ - --- >>>>> >>>>> >>>> >>>>> > >>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>>> For additional commands, e-mail: >>>>> users-help@tomcat.apache.org >>>>> >>>> >>>> >>>> ------------------------------------------------------------------- - -- >>>> >>>> > >>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>> For additional commands, e-mail: >>>> users-help@tomcat.apache.org >>>> >>>> >>>> ------------------------------------------------------------------- - -- >>>> >>>> > >>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>> For additional commands, e-mail: >>>> users-help@tomcat.apache.org >>>> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> >> >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> > -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAloS5ToACgkQHPApP6U8 pFhdfBAAtUeGRMYQlGFy46GJjrALqCk7xAaRhg5+w0gP2YcVqWRRLxqckNjwVH1S o2nt+xg0RLQ8ufoIYNAjsZF0Qd5umv0uEIk7aD46TUPSLzn5g8+JiEch0D+tJTGh 5rsbb2/+RrKuJvT7DIoaTchuxb6zkRcFRmLgjE7n5c1p6fHC9Xv1oowRHgQoOyOT 9V6PhAfysAUdzSPri+RA7AOCgeOLR6kQleyYheWGntNdRgSZC7A3Kom3ipN5TJ77 /CLrsY3qHdOPsBWxC6DhBHkFy9quRcLmoxWu+ZvRxJwnMihK9yqyBPX/SL10mwUg EYN7/ldwf8XOyWX9vbJjtt0SYFdykQZduxgle8smv8Z4DdJUGrD1trwLENFaaH/3 XrODExBjGe7ISA+yZD0Tfx8/1otEj31dk4M3Dcb88mRRpf8lcv4Wz/FZm1WQjIu/ gRTRVJEEpYJjWZg3emf/i2oZldno5F6wcvUjtexVGkttVAdToI8xGUtG95Mq6AaX x7qI4J6jeUf1OYecnOanIwUdXmSpg4IrUWF2w5VqmCqSAJkNyjQXAySyY5Z3SHx8 +PDPdKS1zFEjfzL7n8+B2z8TrHKX4DgfVcluzqTIZRzhE2NlKZZopmHv36apRiOO 4komncOTofG1xyICUfK5t5Jzm9nkYw6pG/o9nCECduU1dt76GOg= =rs9I -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org