hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joan Balagueró <joan.balagu...@grupoventus.com>
Subject RE: QUESTION ABOUT MULTITHREADED HTTP CONNECTION MANAGER
Date Mon, 23 Apr 2007 16:12:20 GMT
Hello Roland,

I have a MHCM instance per host (If I have 5 hosts, I have 5 MHCM, one per
host).

The configuration is always the same:

HttpClient objHttp = new HttpClient(new
MultiThreadedHttpConnectionManager());
objHttp.getHttpConnectionManager().getParams().setMaxConnectionsPerHost(Host
Configuration.ANY_HOST_CONFIGURATION, Integer.MAX_VALUE);


But the question is: if I set "maxConnectionsPerHost" to a unlimited value,
but I DON'T SET the maxTotalConnections (so the used value is the default
value, that's 20), then my MHCM has a maximum number of connections to 20
???

Thanks a lot,

Joan.









-----Mensaje original-----
De: Roland Weber [mailto:ROLWEBER@de.ibm.com] 
Enviado el: lunes, 23 de abril de 2007 17:05
Para: HttpClient User Discussion
Asunto: Re: QUESTION ABOUT MULTITHREADED HTTP CONNECTION MANAGER

Hello Joan,

have a look at the Threading Guide:
http://jakarta.apache.org/commons/httpclient/threading.html

I think the default for the timeout is "no timeout".
You can look it up somewhere in the client parameters:
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/http
client/params/HttpClientParams.html#CONNECTION_MANAGER_TIMEOUT


hope that helps,
  Roland






Hello,

I’m using a MHCM with httpClient 3.0.

If I don’t set the maxTotalConnections and the connectionManagerTimeout for
my instance of MHCM, what values are used?

The reason for this question is the following: I have an application in
production mode that was working perfectly for months. Now there are more
requests per second, and sometimes requests that took 50ms before, now take
more than 10 seconds.

It seems that when my application receives the request, the pool is full and
it has to wait for “x” milliseconds before a connection is available.

Thanks,

Joan.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message