RE: Re: Issues with keepAlive

2010-02-17 Thread Nicolas Rinaudo
Hi Thierry,

Ok, I've worked things out. I feel a bit silly now.

The problem wasn't using a new client for each new request, but the fact that I 
wasn't emptying and releasing entity streams - since I wasn't releasing the 
connection, it couldn't be used by further requests.

Problem solved !

Nicolas

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2448388


RE: Re: Issues with keepAlive

2010-02-16 Thread Nicolas Rinaudo
Hi Thierry,

I'm sorry, I should have mentioned: the queries I perform are *not* in 
parallel. I basically do

System.setProperty(http.maxConnections, 1);
for(int i = 0; i  2000; i++)
new Client(new Context(), Protocol.HTTP).handle(new Request(Method.GET, 
http://localhost:8182;));

I ran this test with both the default and Simple client connectors and observe 
up to 200 open sockets at the same time.

On the other hand, running the same test using standard URLConnection instances 
only opens 1 socket.

Let me know if there's anything else I can do to help you track this bug down.

Cheers,
Nicolas

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2448028