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 28B501057B for ; Thu, 2 Jan 2014 17:48:47 +0000 (UTC) Received: (qmail 74371 invoked by uid 500); 2 Jan 2014 17:48:19 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 74156 invoked by uid 500); 2 Jan 2014 17:48:06 -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 74007 invoked by uid 99); 2 Jan 2014 17:48:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jan 2014 17:48:00 +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.16] (HELO qmta01.westchester.pa.mail.comcast.net) (76.96.62.16) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jan 2014 17:47:53 +0000 Received: from omta18.westchester.pa.mail.comcast.net ([76.96.62.90]) by qmta01.westchester.pa.mail.comcast.net with comcast id 93sz1n0071wpRvQ515nYPk; Thu, 02 Jan 2014 17:47:32 +0000 Received: from Christophers-MacBook-Pro.local ([98.226.18.8]) by omta18.westchester.pa.mail.comcast.net with comcast id 95nY1n00C0AT6Uq3e5nY6q; Thu, 02 Jan 2014 17:47:32 +0000 Message-ID: <52C5A634.5020800@christopherschultz.net> Date: Thu, 02 Jan 2014 12:47:32 -0500 From: Christopher Schultz User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: All worker threads of my tomcat have been occupied! 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=q20121106; t=1388684852; bh=3FlgDe+u+6scb3AfIFbrbSuCsDq3ZsW9A4xUoNLS01g=; h=Received:Received:Message-ID:Date:From:MIME-Version:To:Subject: Content-Type; b=n+qjSrqxYHKgTb+QAgeJoVkeUZJSAodk+bTEOxh7Og7cYP0djBdyehnbpv7YBp8Vv 08z1XFST4bmCXuX5Th5PKonnAN7IOMXaLOqSRwiuy/Yw4Jw0Nh1UMQEL+1L5k1fTRC Gmb3oXTvULeU+5/XA4UCFTwGLFpqmLpPgFXfWve0dqQLXKmjCCiuHqO27iW2WWcZ0d +5uYPE87a3aduftUBP5MnqsB6VEHFkvRvKPYHqOXvGNVfDXBdFFcjTZq+wS2mVwJx6 jEUk9x36jhgCyyIE1llEt2pH7IpOkaMHQpjCp6O07qRuaf8HnDcrQ2jkVMnXY/U5yl ww17tnZaanOrQ== X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Benimaur, On 1/2/14, 5:20 AM, Benimaur Gao wrote: > I found my tomcat refusing to work this morning. I tried jstack to > get some info, and then I found a lot of thread call stack like: > > "http-8082-154" daemon prio=10 tid=0x00007f711c21f800 nid=0x5b0a > waiting on >> condition [0x00007f70dc887000] java.lang.Thread.State: >> TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native >> Method) at >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:132) Your >> context (aka web application) is reloading. That's the only time StandardContextValve calls Thread.sleep() -- and only in Tomcat 6. Tomcat 7 and 8 don't do this. The request coming from the remote client (indicated by the use of the "http-xxxx-yyyy" thread name) is waiting on the webapp to complete its reload. You'll see one of these threads in this state for each request you got since the webapp started reloading. > It seems all of the 200 JIoEndpoint$Worker threads had been > occupied. and I guess that's why tomcat refuse to serve any > incoming request. Sounds about right. > After I got a copy of the source of my tomcat. I found $ grep -B3 > -A8 context.getPaused\(\) > /home/benimaur/workspace/eclipse/tomcat/src/org/apache/catalina/core/StandardContextValve.java > > >> 126- 127- // Wait if we are reloading 128- boolean >> reloaded = false; 129: while (context.getPaused()) { 130- >> reloaded = true; 131- try { 132- >> Thread.sleep(1000); 133- } catch (InterruptedException >> e) { 134- ; 135- } 136- } 137- >> > > It seems context had been set to reload state at some time, but I > can't figure out under what circumstance would put tomcat into > such state. does any one here could give me more clue? thanks in > advance. Do you use the manager app? What are your settings for things like reloading, etc. from server.xml? - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJSxaYzAAoJEBzwKT+lPKRY7FAP/1UHDzaui8CrPV2E5JvCRDvF QlMagAJmIN0+2Lm9LwTNG05ExmOTiH3AEf3hfiBC+YrzWc+jDYbCasDwjoCYMEuS ZYgRIMO+nfzVyMhDEK8e9/AHfEg7YN/4R6EmWH4bv8MvMmnS9px1JzGI78BfggkT v550utxeKGIS/C21YRwJWsqFg16TdfRWhBLe/TZYbdpoNzkHjTstTJ+18iAZZZpC 0rkqpT4QW/KL28CGFNdo4hmN459zFBoLte1p3ZfMXBmvg4WmOavaGBlyblNQWD8k BMlaidAjRdkZXdI9zXGqz9NVGPP87+YAPPQxAXw2zcnqYyNTHhtA62mn3keq3gS7 cMuyrTXezFvdkOS+pQn3NtEQeI57S8GEO/WZnmNHpQYOQEyUVKPGBiyK3tYmcDVf 3bWIRykp7kP6HG2gxHaeIZWhwo6ub6UtFiSSW413NzX4x4k4EuP7bWO5rdMwgK2i bIZTV8KLwkF7x8xsxDAIZdkhBgydQRzN1XtO+nB6mNql7v/hl5kf1ncHQK8ed2FW jy2qzgqI43XF3gtnTrk6FLUeMYxDfaavTB/6Ge7d7AQHKClAy9Qc4WPdjANu6zkC jJ/pu1BBD85Aa2pkswYwnCmnGUgtfjBLCmMeSrkhLSPqxvll/oQkoF0Qz4wGkOJL 2UARqAHN6uEn7c6XZ4Yb =gfWU -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org