Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 65659 invoked from network); 1 Jul 2008 04:12:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Jul 2008 04:12:06 -0000 Received: (qmail 39472 invoked by uid 500); 1 Jul 2008 04:11:54 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 39446 invoked by uid 500); 1 Jul 2008 04:11:54 -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 39435 invoked by uid 99); 1 Jul 2008 04:11:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jun 2008 21:11:54 -0700 X-ASF-Spam-Status: No, hits=2.1 required=10.0 tests=DNS_FROM_RFC_BOGUSMX,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [82.182.133.20] (HELO nerv.dolda2000.com) (82.182.133.20) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jul 2008 04:11:03 +0000 Received: from [IPv6:2002:52b6:8514:200:21d:7dff:fea1:197] ([IPv6:2002:52b6:8514:200:21d:7dff:fea1:197]) (authenticated bits=0) by nerv.dolda2000.com (8.13.8/8.13.8/Debian-3) with ESMTP id m614BJfZ002745 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 1 Jul 2008 06:11:20 +0200 Subject: Blocking threads in Tomcat From: Fredrik Tolf To: Tomcat Users List Content-Type: text/plain; charset=UTF-8 Date: Tue, 01 Jul 2008 06:11:19 +0200 Message-Id: <1214885479.3679.12.camel@pc7.dolda2000.com> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (nerv.dolda2000.com [IPv6:2002:52b6:8514:200::1]); Tue, 01 Jul 2008 06:11:20 +0200 (CEST) X-Virus-Checked: Checked by ClamAV on apache.org Hi list! I've had some issues with requests not being carried out in parallel by Tomcat. My problem is that I haven't been able to figure out when a worker thread blocks and when it does not. To try and pin down the behavior, I did a little experiment. I took a servlet that I had, that handles to separate URLs; let's call them "/a" and "/b". To try out the parallelism, I added a little delay in the servlet code by calling Thread.sleep(10000). I then tried them out in two browser tabs, and I find the results much enigmatic. When I try to access "/a" in one tab and "/b" in another, they both load in 10 seconds each -- that is, if I start the request for "/a" at 12:00:10 and the request for "/b" at 12:00:15, the request for "/a" will finish at 12:00:20, and the request for "/b" will finish at 12:00:25. As one would expect. However, when I request "/a" in both tabs, the requests seem to be carried out in sequence -- that is, if I again start the request in tab 1 for "/a" at 12:00:10 and the request for in tab 2 for, also for "/a", at 12:00:15, the request for tab 1 will finish at 12:00:20, and the request for tab 2 will finish at 12:00:30. Why is this? Is Tomcat explicitly not handling two requests for the exact same URL in parallel? It is the only explanation I can think of, but I cannot figure out how or why it would make sense. If it is indeed the case, can I somehow tell Tomcat to not do that? Thanks for your attention! Fredrik Tolf --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org