Joan Balagueró wrote:
Hello,

I’m testing HttpClient4, and I’ve found the following problem.

I set MaxTotalConnections to Integer.MAX_VALUE:

ConnManagerParams.setMaxTotalConnections(this.objHttpParams,
Integer.MAX_VALUE);

But when I send 5 simultaneous requests, I get 2 “maxConnections” errors.
The exception is:


...


I suppose I’m forgetting something. Maybe
“ConnManagerParams.setMaxConnectionsPerRoute()”. Any help?


That's exactly the case. Per requirements of the HTTP spec HTTP agents may not be using more than 2 concurrent connections to the same host. To override this behavior set the max connection per route parameter to a greater number.

Hope this helps

Oleg



Thanks,

Joan.




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to