hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: MAX CONNECTIONS
Date Thu, 05 Feb 2009 20:46:41 GMT
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: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message