Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 54347 invoked from network); 6 Apr 2009 11:52:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Apr 2009 11:52:09 -0000 Received: (qmail 76682 invoked by uid 500); 6 Apr 2009 11:52:09 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 76605 invoked by uid 500); 6 Apr 2009 11:52:08 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 76595 invoked by uid 99); 6 Apr 2009 11:52:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2009 11:52:08 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [217.150.250.44] (HELO ok2consulting.nine.ch) (217.150.250.44) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2009 11:52:02 +0000 Received: by ok2consulting.nine.ch (Postfix, from userid 1000) id 62F3319859C; Mon, 6 Apr 2009 13:51:40 +0200 (CEST) Date: Mon, 6 Apr 2009 13:51:40 +0200 From: Oleg Kalnichevski To: HttpComponents Project Subject: Re: Max number of requests/persistent connection - 100? Message-ID: <20090406115140.GA8502@ok2consulting.com> References: <41640.193.65.64.241.1239016565.squirrel@webmail3.nebula.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41640.193.65.64.241.1239016565.squirrel@webmail3.nebula.fi> User-Agent: Mutt/1.5.9i X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Apr 06, 2009 at 02:16:05PM +0300, Tuomas Makinen wrote: > Hi, > > I'm facing a weird problem when using HttpCore & NIO-extension to send > multiple requests using one connection. > > I have custom build performance load testing tool that is used to test our > application and it's working otherwise well except for one thing: > Tuomas, Firstly, a general design question. Why would you want to use NIO on the client side in the first place, especially for a performance testing tool? > After 100 requests sent to one connection, the framework doesn't ask for > new requests from HttpRequestExecutionHandler anymore but neither is the > connection closed too. Still, response has been acquired from that > connection so it should block due to that. > > Any ideas what could be wrong? > There is no such limit in HttpCore. However, 100 sounds like a very likely limit for persistent connection re-use on the server side. Do you see NHttpRequestExecutionHandler#finalizeContext even fire? I strongly recommend taking a look at this sample which demonstrates the recommended way of managing non-blocking connections on the client side. http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClientConnManagement.java Cheers Oleg > I tried to find any references to this problem from HttpCore & > NIO-extension source codes but couldn't really find any. Ofcourse the > problem might be in my code too but from that part it's pretty > straighforward and I'm just fetching new requests from queue when > submitRequest call occurs and I can see that always after 100 requests, it > doesn't send new ones anymore. > > With best regards, > Tuomas Makinen > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org > For additional commands, e-mail: dev-help@hc.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org