hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: MultiThreadedHttpConnectionManager and CLOSE_WAIT
Date Wed, 23 Apr 2003 15:10:51 GMT
Hi Niranjan,

This problem should be cleared up with the latest nightly build of 
HttpClient.  Quite a bit of work has been put in recently to fix 
problems with connection timeout and host management.

> Questions:
> ----------
> 1) Is this usage of HttpClient correct?

Yes, what you are doing is fine.

> 2) Is there some way for the connection pool to know that the connection is
> not usable? I read some other mails that seem to suggest that I need to wait
> for a redesign. Is this available?

As previously mentioned, this has recently been fixed.  Connection are 
now tested before reuse and re-opened when necessary.

> 3) When I do netstat, I see lot of connections to the server in CLOSE_WAIT
> state. These were used by HttpClient previously and then were timed out by
> the server. Is the HttpClient not closing sockets explicitly whenever it
> knows that a connection is in CLOSE_WAIT? Or is my usage incorrect?

The connections are being closed, but something about the underlying 
socket implementation keeps the connection open for a period of time. 
Take a look at:

http://www.developerweb.net/sock-faq/flatfaq.php
and
http://www.developerweb.net/sock-faq/detail.php?id=13

Mike


Mime
View raw message