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 0FF03200D0A for ; Wed, 4 Oct 2017 16:33:34 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0CEDF1609E2; Wed, 4 Oct 2017 14:33:34 +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 2B4051609D6 for ; Wed, 4 Oct 2017 16:33:33 +0200 (CEST) Received: (qmail 75798 invoked by uid 500); 4 Oct 2017 14:33:30 -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 75788 invoked by uid 99); 4 Oct 2017 14:33:30 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Oct 2017 14:33:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 251611A22CD for ; Wed, 4 Oct 2017 14:33:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.972 X-Spam-Level: X-Spam-Status: No, score=0.972 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id kEc6zCQGfBTS for ; Wed, 4 Oct 2017 14:33:27 +0000 (UTC) Received: from rgout05.bt.lon5.cpcloud.co.uk (rgout0501.bt.lon5.cpcloud.co.uk [65.20.0.222]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 935EE6104E for ; Wed, 4 Oct 2017 14:33:27 +0000 (UTC) X-OWM-Source-IP: 217.44.155.55 (GB) X-OWM-Env-Sender: medthomas@btinternet.com X-Junkmail-Premium-Raw: score=7/50,refid=2.7.2:2017.10.4.140316:17:7.944,ip=,rules=__USER_AGENT, __IN_REP_TO, __REFERENCES, __MIME_VERSION, __CT, __CT_TEXT_PLAIN, __CTE, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __TO_MALFORMED_2, __TO_NAME, __TO_NAME_DIFF_FROM_ACC, __HAS_FROM, __HAS_MSGID, __SANE_MSGID, __MSGID_APPLEMAIL, __ANY_URI, __HTTPS_URI, __URI_WITH_PATH, __CANPHARM_UNSUB_LINK, __URI_NO_WWW, __CP_URI_IN_BODY, __FRAUD_URGENCY, __SUBJ_ALPHA_NEGATE, __URI_IN_BODY, __URI_NOT_IMG, __FORWARDED_MSG, __NO_HTML_TAG_RAW, BODY_SIZE_3000_3999, __MIME_TEXT_P1, __MIME_TEXT_ONLY, __URI_NS, HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, IN_REP_TO, MSG_THREAD, __TO_REAL_NAMES, LEGITIMATE_SIGNS, __FRAUD_COMMON, __SINGLE_URI_TEXT, SINGLE_URI_IN_BODY, __MIME_TEXT_P, REFERENCES, BODY_SIZE_7000_LESS, URI_WITH_PATH_ONLY Received: from mail.homeinbox.net (217.44.155.55) by rgout05.bt.lon5.cpcloud.co.uk (9.0.019.13-1) (authenticated as medthomas@btinternet.com) id 5957E5060968645E for users@tomcat.apache.org; Wed, 4 Oct 2017 15:33:20 +0100 Received: from localhost (localhost [127.0.0.1]) by mail.homeinbox.net (Postfix) with ESMTP id 255F8F00482 for ; Wed, 4 Oct 2017 15:33:20 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at homeinbox.net Received: from mail.homeinbox.net ([127.0.0.1]) by localhost (server03.homeinbox.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qAcWKa1vZUvk for ; Wed, 4 Oct 2017 15:33:20 +0100 (BST) Received: from [IPv6:2a01:4c8:40c:f8ac:1:2:660f:2e93] (unknown [213.205.194.202]) by mail.homeinbox.net (Postfix) with ESMTPSA id D993EF001C8 for ; Wed, 4 Oct 2017 15:33:19 +0100 (BST) Date: Wed, 04 Oct 2017 15:33:27 +0100 User-Agent: K-9 Mail for Android In-Reply-To: <26cf79e5-cf4b-e101-fbfe-5c67945fab15@apache.org> References: <26cf79e5-cf4b-e101-fbfe-5c67945fab15@apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: AJP connection pool issue bug? To: Tomcat Users List From: Mark Thomas Message-ID: <7A29D23B-BA3F-4319-B5BE-4FA844DF4E78@apache.org> archived-at: Wed, 04 Oct 2017 14:33:34 -0000 On 4 October 2017 15:17:25 BST, Mark Thomas wrote: >On 04/10/17 13:51, TurboChargedDad =2E wrote: >> Hello all=2E=2E >> I am going to do my best to describe my problem=2E Hopefully someone >will >> have some sort of insight=2E >>=20 >> Tomcat 7=2E0=2E41 (working on updating that) >> Java 1=2E6 (Working on getting this updated to the latest minor >release) >> RHEL Linux >>=20 >> I inherited an opti-tenant setup=2E Individual user accounts on the >system >> each have their own Tomcat instance, each is started using sysinit=2E= =20 >This >> is done to keep each website in its own permissible world so one >website >> can't interfere with a others data=2E >>=20 >> There are two load balanced apache proxies at the edge that point to >one >> Tomcat server (I know I know but again I inherited this) >>=20 >> Apache lays over the top of tomcat to terminate SSL and uses AJP to >> proxypass to each tomcat instance based on the users assigned port=2E >>=20 >> Things have run fine for years (so I am being told anyway) until >recently=2E >> Let me give an example of an outage=2E >>=20 >> User1, user2 and user3 all use unique databases on a shared database >> server, SQL server 10=2E >>=20 >> User 4 runs on a windows jboss server and also has a database on >shared >> database server 10=2E >>=20 >> Users 5-50 all run in the mentioned Linux server using tomcat and >have >> databases on *other* various shared databases servers but have >nothing to >> do with database server 10=2E >>=20 >> User 4 had a stored proc go wild on database server 10 basically >knocking >> it offline=2E >>=20 >> Now one would expect sites 1-4 to experience interruption of >service >> because they use a shared DBMS platform=2E However=2E >>=20 >> Every single site goes down=2E I monitor the connections for each site >with a >> custom tool=2E When this happens, the connections start stacking up >across >> all the components=2E (Proxies all the way through the stack) >> Looking at the AJP connection pool threads for user 9 shows that user >has >> exhausted their AJP connection pool threads=2E They are maxed out at >300 yet >> that user doesn't have high activity at all=2E The CPU load, memory >usage and >> traffic for everything except SQL server 10 is stable during this >outrage=2E >> The proxies start consuming more and more memory the longer the >outrage >> occurs but that's expected as the connection counts stack up into the >> thousands=2E After a short time all the sites apache / ssl termination >later >> start throwing AJP timeout errors=2E Shortly after that the edge >proxies >> will naturally also starting throwing timeout errors of their own=2E >>=20 >> I am only watching user 9 using a tool that allows me to have insight >into >> what's going on using JMX metrics but I suspect that once I get all >the >> others instrumented that I will see the same thing=2E Maxed out AJP >> connection pools=2E >>=20 >> Aren't those supposed to be unique per user/ JVM? Am I missing >something in >> the docs? >>=20 >> Any assistance from the tomcat gods is much appreciated=2E > >TL;DR - Try switching to the NIO AJP connector on Tomcat=2E > >Take a look at this session I just uploaded from TomcatCon London last >week=2E You probably want to start around 35:00 and the topic of thread >exhaustion=2E Whoops=2E Here is the link=2E https://youtu=2Ebe/2QYWp1k5QQM Mark > >HTH, > >Mark > >P=2ES=2E The other sessions we have are on the way=2E I plan to update th= e >site and post links once I have them all uploaded=2E > >--------------------------------------------------------------------- >To unsubscribe, e-mail: users-unsubscribe@tomcat=2Eapache=2Eorg >For additional commands, e-mail: users-help@tomcat=2Eapache=2Eorg --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org