Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 2687 invoked from network); 10 Jan 2008 13:06:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jan 2008 13:06:12 -0000 Received: (qmail 48187 invoked by uid 500); 10 Jan 2008 13:05:58 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 47931 invoked by uid 500); 10 Jan 2008 13:05:57 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 47920 invoked by uid 99); 10 Jan 2008 13:05:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jan 2008 05:05:57 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of skibaa@gmail.com designates 72.14.202.182 as permitted sender) Received: from [72.14.202.182] (HELO ro-out-1112.google.com) (72.14.202.182) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jan 2008 13:05:33 +0000 Received: by ro-out-1112.google.com with SMTP id p4so529461roc.4 for ; Thu, 10 Jan 2008 05:05:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=AGMwb6/WZ7fJPfcfPFJOz4hjgy+JMCw1BKXc1zG8q+U=; b=LFR47NuzC6yiaEvfgUTntQ9CjsWXPbn2CjR+8iqJvwWILEeiE/Lk/P781HWeSFww6bgjP5WVeruiBdvOWJ71BHNmZkhF+rlfXh5fNqlgCI+hUJZCEczvnPJaoUeQ+oqrWxAJ6vmOvlxzSt1Y27vahKkV5QabPAk2Wi7Q/tOHKQc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Q1td7ZoGadVO/9uOJmguYEnTGdQ4amKpayXYkPjvXQuUlsq+WtFts2RtAHW3rdExkl9WqG5g8s22BqkxqgRJcYk3Uq4NuAcINJrOdVp9x/NK6U6UJyUV9OJCvmEoufSr4YZTGuYN3/BS4yIdaoUOpPSxwc/n5JxanCKQAH288Yw= Received: by 10.142.115.10 with SMTP id n10mr897107wfc.95.1199970337576; Thu, 10 Jan 2008 05:05:37 -0800 (PST) Received: by 10.142.126.8 with HTTP; Thu, 10 Jan 2008 05:05:37 -0800 (PST) Message-ID: Date: Thu, 10 Jan 2008 15:05:37 +0200 From: "Andrew Skiba" To: "Tomcat Developers List" Subject: Re: backlog measurement In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_22683_14483304.1199970337563" References: <4026A09E-5396-4671-BBCE-DF6E219398A6@objektpark.de> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_22683_14483304.1199970337563 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline It works with tomcat from trunk now. I opened a bug and attached a patch for the new code. License and author specified as you said. Please review. http://issues.apache.org/bugzilla/show_bug.cgi?id=44199 On Jan 10, 2008 11:47 AM, Andrew Skiba wrote: > Hi Peter, thanks for your reply, > > The name of Harish appears in the code by mistake. I started from > DefaultSocketFactory written by Harish, but nothing remained from the > original. So I am the author and I will include Apache license in the code. > > You are correct, it works only with java 5, and I checked it only with > tomcat 5.5. I will check it with tomcat 6 as well. > > I will open a bug and attach the fixed code. > > Andrew. > > > On Jan 10, 2008 11:30 AM, Peter Rossbach wrote: > > > HI Andrew, > > > > good idea, but why you can contribute a code from Harish Prabandham > > (db@eng.sun.com). > > We can only accept contributions from orignal author and with Apache > > 2 license included! > > > > I seems that this only work with java 5 and the code is designed for > > JIO HTTP tomcat 5.5. > > > > Open a bug report, then we can discuss your contribution. > > > > Regards, > > Peter > > > > > > Am 10.01.2008 um 09:47 schrieb Andrew Skiba: > > > > > Hello, > > > > > > I want to contribute a custom SocketFactory allowing to analyze the > > > utilization of acceptConnection attribute of a Connector. In a > > > properly configured production system, there should be rare > > > situations where connections wait for a worker thread to be > > > handled. Our client complained on high latency of web requests, but > > > the measurement on servlet did not show high latency. So we wanted > > > to know the number of connections which wait in socket backlog and > > > were not accepted yet. > > > > > > I solved this problem by writing a custom SocketFactory, which > > > accepts connections immediately and puts it in my queue until a > > > call to accept() will take them. So the number of waiting > > > connections can be monitored via JMX. > > > > > > To activate this factory, the declaration of the corresponding > > > Connector in server.xml should be changed like in the following > > > example. > > > > > > > > maxThreads="10" minSpareThreads="5" maxSpareThreads="7" > > > > > enableLookups="false" redirectPort="8443" > > > acceptCount="10" > > > connectionTimeout="2000" disableUploadTimeout="true" > > > > > > > > > socketFactory="org.apache.tomcat.util.net.BacklogMeasuringServerSocket > > > Factory"/> > > > > > > > > > No changes in existing classes are required. > > > > > > Please review the code in the attachment. > > > > > > > > > Andrew Skiba. > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > > > For additional commands, e-mail: dev-help@tomcat.apache.org > > > > > ------=_Part_22683_14483304.1199970337563--