Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 79558 invoked from network); 26 May 2009 19:20:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 May 2009 19:20:49 -0000 Received: (qmail 83078 invoked by uid 500); 26 May 2009 19:20:58 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 83029 invoked by uid 500); 26 May 2009 19:20:58 -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 83018 invoked by uid 99); 26 May 2009 19:20:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 May 2009 19:20:58 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 May 2009 19:20:47 +0000 Received: from localhost (localhost [127.0.0.1]) by tor.combios.es (Postfix) with ESMTP id 9FC4F226082 for ; Tue, 26 May 2009 21:17:36 +0200 (CEST) Received: from tor.combios.es ([127.0.0.1]) by localhost (tor.combios.es [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xphgmzgmxxUF for ; Tue, 26 May 2009 21:17:36 +0200 (CEST) Received: from [192.168.245.129] (montserrat.wissensbank.com [212.85.37.175]) by tor.combios.es (Postfix) with ESMTPA id 44AE7226075 for ; Tue, 26 May 2009 21:17:36 +0200 (CEST) Message-ID: <4A1C40E6.90104@ice-sa.com> Date: Tue, 26 May 2009 21:20:06 +0200 From: =?UTF-8?B?QW5kcsOpIFdhcm5pZXI=?= Reply-To: aw@ice-sa.com User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Tomcat not closing threads -- SOLVED ?? References: <917635.24306.qm@web111820.mail.gq1.yahoo.com> <567858.90949.qm@web111809.mail.gq1.yahoo.com> <556827.61220.qm@web111806.mail.gq1.yahoo.com> <0AAE5AB84B013E45A7B61CB66943C17228D926EC63@USEA-EXCH7.na.uis.unisys.com> <367812.34490.qm@web111810.mail.gq1.yahoo.com> <270408.51922.qm@web111817.mail.gq1.yahoo.com> <942183.26079.qm@web111801.mail.gq1.yahoo.com> <740240.94102.qm@web111811.mail.gq1.yahoo.com> <835909.80945.qm@web111809.mail.gq1.yahoo.com> <153405.37013.qm@web111816.mail.gq1.yahoo.com> <4A1C4044.7070809@ice-sa.com> In-Reply-To: <4A1C4044.7070809@ice-sa.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org André Warnier wrote: > Chetan Chheda wrote: >> After some digging thru config files setup by the vendor, I think I >> might have found the root cause ..Correlating the access_log and >> tomcat logs, I found out that tomcat threads were shooting up whenever >> a large number of GIF files were being requested. >> These are the modjk settings in our application config files that are >> included in httpd.conf JkMount /LCSW/* ajp13 JkMount /LCSW/*.jsp ajp13 >> JkMount /LCSW/*.jsp/* ajp13 > > The above seems totally redundant to me. The first JkMount will > "capture" anything starting with /LCSW/, no ? > If yes, then the following two are totally redundant. > >> >> So when an image is accessed via the following URL, >> http://blahbhal/LCSW/images/header.gif , the above routes were sending >> it to tomcat. I verified this by shutting down tomcat and accessing >> the above URL, and was unsuccessful. >> >> Now I plan to add the following excludes JkUnMount /*.htm ajp13 >> JkUnMount /*.html ajp13 >> JkUnMount /*.png ajp13 >> JkUnMount /*.gif ajp13 >> JkUnMount /*.jpg ajp13 > > That will work. > >> >> I tested the above in a test environment and was able to access a gif >> file with tomcat down. >> my question is, how does the ajp13 connector interpret a gif >> file/static content request as opposed to a jsp request? > As far as I know, it does not see the difference, nor care about it. It > only takes into account the match/unmatch of the request URL. It has no > idea of what "static" or "dynamic" content is. > > Separately : > > For the kind of thing you are doing above, there exists an alternative > syntax to the JkMount/JkUnMount pair, which I personally prefer because > I find that it better "fits" in the Apache configuration logic. > > Here is an example : > > > SetHandler jakarta-servlet > SetEnvIf REQUEST_URI \.(html?|png|gif|jpg)$ no-jk > ... > > > (You can of course easily insert other Apache statements inside the same > Location block, for example authentication etc.. > > You find this toward the end of this documentation page : > http://tomcat.apache.org/connectors-doc/reference/apache.html > > The "SetHandler jakarta-servlet" does essentially the same as the > JkMount, for everything that fits under /LCSW. > The SetEnvIf then selectively sets the Apache environment variable > "no-jk" (here, whenever the request URI ends in one of the listed > extensions). > The mod_jk module is always called (because it is the content handler > for this section), but it declines to process this URL because the no-jk > variable is set. > Apache thus processes the request with its own default handler, which > serves the content. > > To see exactly what happens, step by step, set the JkLogLevel to > "debug", make a request, and look at the jk logfile. > > Erratum : replace by in the above. Otherwise, it would also match /LCSW1/ for instance. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org