cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xiaobin <zhengxb2...@gmail.com>
Subject Re: Dealing with CLOSE_WAIT connections
Date Mon, 03 Aug 2015 21:17:52 GMT
Thanks Sergey. WebClient.client() and invoking close() seems help. Most of
the connections transitioned to TIME_WAIT and eventually get closed.

Btw, isn't auto-closure of the response available only from CXF 2.7.7 ?

-Xiaobin

2015-08-02 14:12 GMT-07:00 Sergey Beryozkin <sberyozkin@gmail.com>:

> Hi
> Can you cast a proxy to WebClient (via its utility method
> WebClient.client()) and close it, and also enable the auto-closure of the
> Response ?
> Sergey
>
> On 31/07/15 02:59, Xiaobin wrote:
>
>> Hi guys,
>>
>> I am using CXF 2.7.5. I have an application using JAXRSClientFactoryBean
>> to
>> generate proxy, and use following code to close client when it is done:
>>
>> ClientConfiguration config = WebClient.getConfig(root);
>>      HTTPConduit conduit = config.getHttpConduit();
>>      if (conduit == null) {
>>        throw new IllegalArgumentException();
>>      }
>>      conduit.close();
>>
>> As time goes on, I noticed that there are many connections shown by
>> netstat
>> in CLOSE_WAIT state.
>>
>> I understand that because of CXF-5144, it won't be able to re-use
>> connections. But besides this, is there anything I can do with those
>> CLOSE_WAIT connections ? Are these going to time out eventually or ?
>>
>> Also, I am wondering if setting ConnectionType.CLOSE would help ?
>>
>> Look forward to your suggestions! Thanks in advance.
>>
>>
>> -Xiaobin
>>
>>
>


-- 
Xiaobin Zheng
Tel:+1 917-755-3249

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message