Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 61DEB200C4C for ; Mon, 20 Mar 2017 22:52:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 607C2160B71; Mon, 20 Mar 2017 21:52:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B0EA6160B8F for ; Mon, 20 Mar 2017 22:52:46 +0100 (CET) Received: (qmail 98159 invoked by uid 500); 20 Mar 2017 21:52:45 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 98143 invoked by uid 99); 20 Mar 2017 21:52:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Mar 2017 21:52:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 60A47CD85A for ; Mon, 20 Mar 2017 21:52:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.451 X-Spam-Level: * X-Spam-Status: No, score=1.451 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id U-GWV-dwTw4o for ; Mon, 20 Mar 2017 21:52:44 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 8905D61EC2 for ; Mon, 20 Mar 2017 21:52:44 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E24E1E0BB3 for ; Mon, 20 Mar 2017 21:52:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 42CD1254DF for ; Mon, 20 Mar 2017 21:52:42 +0000 (UTC) Date: Mon, 20 Mar 2017 21:52:42 +0000 (UTC) From: "Liam Williams (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HTTPCLIENT-1583) Add option to create a connection eviction thread for a non-shared connection manager MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 20 Mar 2017 21:52:47 -0000 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15933650#comment-15933650 ] Liam Williams commented on HTTPCLIENT-1583: ------------------------------------------- I raised [HTTPCLIENT-1835|https://issues.apache.org/jira/browse/HTTPCLIENT-1835] for this issue. Do you need a separate PR on Github from separate feature branches or can you make use of the existing PR with the changes for HTTPCLIENT-1830 and HTTPCLIENT-1835 on the same branch? > Add option to create a connection eviction thread for a non-shared connection manager > ------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1583 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1583 > Project: HttpComponents HttpClient > Issue Type: Improvement > Affects Versions: 4.3.5 > Reporter: yair ogen > Priority: Minor > Fix For: 4.4 Final > > > In the tutorial: > http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html, section 2.5 Connection eviction policy - you explain how to clean-up connections. Although I can argue against the design as without this if server closes connections, my client gets many sockets stuck on CLOSE_WAIT - adding this thread solves the CLOSE_WAIT issue. > However, I don't understand why you don't do this yourself if keep-alive is set. I would expect the library to support such a thread. In the meanwhile, it seems that if I use the default connection manager, I can't use non-deprecated code to call : > connMgr.closeExpiredConnections(); > and > connMgr.closeIdleConnections(30, TimeUnit.SECONDS); > This is because the only exposed API to get the default pooling connection manager is by calling: > httpClient.getConnectionManager(), which is deprecated. Javadoc suggests to go to the builder (which I do use but not for creating connection pool as the default is good enough for me) which is useless. > So - how should one acquire a reference to the connection manager? -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org