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 0712B10C3F for ; Fri, 27 Dec 2013 07:28:47 +0000 (UTC) Received: (qmail 58151 invoked by uid 500); 27 Dec 2013 07:28:29 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 58048 invoked by uid 500); 27 Dec 2013 07:28:27 -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 58038 invoked by uid 99); 27 Dec 2013 07:28:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Dec 2013 07:28:25 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.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.229 as permitted sender) Received: from [212.85.38.229] (HELO tor.combios.es) (212.85.38.229) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Dec 2013 07:28:18 +0000 Received: from [192.168.245.129] (p549E3455.dip0.t-ipconnect.de [84.158.52.85]) (Authenticated sender: andre.warnier@ice-sa.com) by tor.combios.es (Postfix) with ESMTPA id 851393C0ACE for ; Fri, 27 Dec 2013 08:28:22 +0100 (CET) Message-ID: <52BD2BFF.2070908@ice-sa.com> Date: Fri, 27 Dec 2013 08:27:59 +0100 From: =?UTF-8?B?QW5kcsOpIFdhcm5pZXI=?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: how http connector backlog attribute works? References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org 侯树成 wrote: > Hi, > I find a problem of http bio connector,I need help. > You can find it in flowing steps: > > 1.set tomcat connector like this: > connectionTimeout="20000" > redirectPort="8443" acceptCount="1" maxThreads="1" > minSpareThreads="1"/> > > 2. deploy a war file, which contains a servlet that will sleep 60s in it's > doPost method > > 3. use LR or JMeter send 5 requests to the serlvet above > > 4. use command jstack print current thread stack > > NOTE: now the main acceptor thread stack like this: > "http-bio-8080-Acceptor-0" daemon prio=6 tid=0x04b49800 nid=0x1a88 waiting > on condition [0x0536f000] > java.lang.Thread.State: WAITING (parking) > at sun.misc.Unsafe.park(Native Method) > - parking to wait for <0x29a06cd0> (a > org.apache.tomcat.util.threads.LimitLatch$Sync) > at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281) > at > org.apache.tomcat.util.threads.LimitLatch.countUpOrAwait(LimitLatch.java:115) > at > org.apache.tomcat.util.net.AbstractEndpoint.countUpOrAwaitConnection(AbstractEndpoint.java:733) > at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:210) > at java.lang.Thread.run(Thread.java:662) > > Now, In the 5 requests, 3 request will served correctly, but another 2 > requests will received "Connection refused error" like this > > Caused by: java.net.ConnectException: Connection refused: connect > at java.net.PlainSocketImpl.socketConnect(Native Method) > at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) > at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) > at java.net.Socket.connect(Socket.java:529) > > Why the 2 requests not entering the thread pool executor or taskQueue, but > get refused quickly? > > Thanks in advance. > Which java and Tomcat versions ? --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org