Hi Rob
Thank you for this detailed answer. I've just read the part of the RFC
you mentionned : "A single-user client SHOULD NOT maintain more than 2
connections with any server or proxy". I did not know that.
I have just tried to set a different number using an Apache HttpClient
and the methods getParams().setDefaultMaxConnectionsPerHost() of its
manager but the problem still persists.
I find that strange that this problem is only related to the client
side. Is there nothing to parameterized on the server side to allow more
than 2 connections from the same end-user ? How to allow them with
restlet classes ?
Thx
Hélia
Rob Heittman a écrit :
Hi, Hélia --
Jerome's first guess was on target; per RFC 2616 section 8.1.4,
clients should by default be configured to allow no more than 2
concurrent connections to the same host. I know for-sure that the
default in Apache HttpClient is this; examine the source of
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager. Any
client program that respects the RFCs will also respect this limit by
default.
Some implementations treat the connection limit as applying to a host
and port combination, some treat it as applying to the host
specifically. I think this is what you are up against, since the
third call is what blocks.
You can set system properties or pass configuration parameters to
increase the number of connections supported by HttpClient (or
whatever client connector you use), or you can create a brand new
Client object in Restlet within each of your resources that must make
a recursive call. In Restlet 1.1 there are neat features for making
internal calls (e.g. the RIAP
protocol, http://wiki.restlet.org/docs_1.1/45-restlet.html) that might
be interesting as well.
- Rob
Any suggestion to bypass this problem is welcomed and sorry if
it's a trivial question,
thanks in advance,
hp