hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Osipov <micha...@apache.org>
Subject Re: What is the relation between TIME_WAIT and HTTP Client calls to a RestService?
Date Thu, 04 Jun 2015 19:31:45 GMT
Am 2015-06-04 um 17:51 schrieb Check Peck:
> I am using Spring RestTemplate to make a HTTP Calls to my RestService. I am
> using spring framework 3.1.1 version of RestTemplate. I cannot upgrade this
> since that's what we are using in our company.
>
> Now machine which is running my code (which uses RestTemplate) to make call
> to my RestService, I see lot of TIME_WAIT connections opened on that
> particular machine?
>
> - Is there any reason why it happens with RestTemplate or the way I am
> using it?
> - Also, what is the connection between TIME_WAIT and HTTP Client calls to
> my RestService? I am not able to understand this as well. Does HTTP Calls
> has any significance on TIME_WAIT? There might be some theoretical
> explanation for this I guess.
> [...]
> And here is netstat details on my box which is running my code to make HTTP
> Calls to my RestService. I am always seeing very high number of TIME_WAIT
> connections.
>
>           72 ESTABLISHED
>            2 FIN_WAIT1
>           17 LISTEN
>         3405 TIME_WAIT
>

This is rather a TCP issue. As far as I can see, Spring Web 3.1.x uses 
version 4.1 of HttpClient [1] and this one is unsupported. I do not know 
wether 4.4 is ABI compatible with 4.1 but you should update the 
HttpClient in your POM and retry, maybe your problem will go away.

I have found a quite good explanation about the issue you are 
experiencing [2], [3], it might be worth to discuss this with your admins.


Michael

[1] 
https://github.com/spring-projects/spring-framework/blob/3.1.x/org.springframework.web/ivy.xml#L63
[2] http://superuser.com/a/173542/222550
[3] http://www4.cs.fau.de/Projects/JX/Projects/TCP/tcpstate.html

---------------------------------------------------------------------
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