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-unsubscr...@hc.apache.org
> For additional commands, e-mail: dev-h...@hc.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to