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 C167C9CA7 for ; Thu, 8 Dec 2011 18:03:35 +0000 (UTC) Received: (qmail 86874 invoked by uid 500); 8 Dec 2011 18:03:31 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 86800 invoked by uid 500); 8 Dec 2011 18:03:31 -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 86791 invoked by uid 99); 8 Dec 2011 18:03:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2011 18:03:31 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Kari.Scott@cdw.com designates 12.32.91.181 as permitted sender) Received: from [12.32.91.181] (HELO mailout3.cdw.com) (12.32.91.181) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2011 18:03:24 +0000 X-IronPort-AV: E=Sophos;i="4.71,319,1320645600"; d="scan'208";a="222264137" X-CSIP: YES From: Kari Scott To: Tomcat Users List Subject: Re: AJP connection timeout setting/Tomcat 6 vs. 7 questions Thread-Topic: AJP connection timeout setting/Tomcat 6 vs. 7 questions Thread-Index: AQHMtFVcab9/H1v3y0qfr0YmzOTxMZXSoyqA Date: Thu, 8 Dec 2011 18:03:02 +0000 Message-ID: <9298B810-818E-49B2-AFA4-51E4DE2852EF@cdw.com> References: <2178B721-36A1-406A-8033-1AB9B620DA93@cdw.com> <4EDE7A4D.4090800@ice-sa.com> In-Reply-To: <4EDE7A4D.4090800@ice-sa.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.30.150.30] Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org On Dec 6, 2011, at 2:25 PM, Andr=E9 Warnier wrote: > Kari Scott wrote: >> We are running Tomcat 6. 0.32 with jdk1.6.0_26 on Solaris 10, mod_ajp 1.= 3 and Apache 2.2.21 on all but one production server which is the same exc= ept for it's running Tomcat 7.0.21. >> I have some questions regarding connection timeout settings. Occasionall= y, when the site is busier we see jumps in the number of connections to 800= 9 and then that number stays high for about 30 minutes before settling back= down into our average range. A thread dump shows that these connections co= rrespond to these socket threads: >> "TP-Processor222" daemon prio=3D3 tid=3D0x00c76400 nid=3D0x5669 runnable= [0x8cf7f000] >> java.lang.Thread.State: RUNNABLE >> at java.net.SocketInputStream.socketRead0(Native Method) >> at java.net.SocketInputStream.read(SocketInputStream.java:129) >> at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) >> at java.io.BufferedInputStream.read1(BufferedInputStream.java:258= ) >> at java.io.BufferedInputStream.read(BufferedInputStream.java:317) >> - locked <0xcb2a0eb0> (a java.io.BufferedInputStream) >> at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:628= ) >> at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:= 566) >> at org.apache.jk.common.ChannelSocket.processConnection(ChannelSo= cket.java:693) >> at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(Chan= nelSocket.java:898) >> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(= ThreadPool.java:690) >> at java.lang.Thread.run(Thread.java:662) >> The problem isn't so much that they stick around, but when these first s= tart increasing, there is a noticeable hit in performance and evidence that= threads are waiting for resources. Oddly, the one trial Tomcat 7 server wi= th the same connector, load and code never experiences this problem. We cur= rently don't have a connectionTimeout specified for our connector so my pla= n is to try the following: >> >> Here are my questions: >> *Do I also need to set the connection_pool_timeout in the worker? Or is = that the one I should be changing instead of connectionTimeout? >> *Is there a different time out setting I should be looking at? >> *Is there an easy explanation as to why Tomcat 7 never experiences this = issue? I'm just wondering (o.k. hoping) that there is some magic Tomcat 7 d= efault setting some place that we can add to our Tomcat 6 environments that= can help us out until we've upgraded everything. > Just a question, to add to your excellent summary above : in your front-e= nd server configuration, what are the settings related to keep-alive ? >=20 All the servers have the following Apache settings:=20 KeepAlive On MaxKeepAliveRequests 200 KeepAliveTimeout 15 > And maybe, can you provide an example of the server.xml (comments and sen= sitive info removed) for both a server which experiences the issue, and for= the 7.0 server which doesn't ? (paste them inside the message, the list st= rips most attachments). >=20 I sure can. I also removed some of the entries that were exactly the same s= o it's easier to see the differences:=20 ***************************************************************************= ****** Tomcat 7 server.xml: Tomcat 6 server.xml: ***************************************************************************= ****** So the big difference is the presence of the JaMON Valve we're using on Tom= cat 6 and but accidentally forgot to put on Tomcat 7. Maybe this was a fort= uitous mistake. I'll try removing it from one of our Tomcat 6 servers to se= e if that's the culprit. We don't need that access logging valve enabled on= Tomcat 7 either, so this was a really good exercise to go through. Thanks! -kari _________________________________ Kari Scott Senior Programmer kari.scott@cdw.com CDW 5520 Research Park Drive Madison, WI 53711 Office: 608 298 1223 Fax: 608 288 3007 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org