hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HTTPCLIENT-1729) Evicting Stale connections from the connection pool
Date Mon, 07 Mar 2016 13:53:40 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Oleg Kalnichevski resolved HTTPCLIENT-1729.
       Resolution: Fixed
    Fix Version/s: 4.5.3

Connection expiration and stale check are _not_ the same thing. Expiration check does not
attempt to ensure that the connection is still valid, only that it has not lived past its
expiration time. 

I fixed the javadoc


> Evicting Stale connections from the connection pool
> ---------------------------------------------------
>                 Key: HTTPCLIENT-1729
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1729
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>    Affects Versions: 4.5.2
>            Reporter: Manikandan Subramanian
>            Priority: Minor
>              Labels: newbie, performance
>             Fix For: 4.5.3
> This is not a bug. But more of a guidance needed here.
> The below documentation suggests
> https://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html
> to use a separate monitor thread that calls closeExpiredConnections() method for stale
connection handling.
> Is this still applicable for 4.5.2 version as well ? I am looking at source code PoolingHttpClientConnectionManager#closeExpiredConnections
which in turn calls the pool#closeExpired.
> The closeExpired method checks only the expiration of the connections. However there
seems to be no check on whether the connection is stale.
> Should we still handle stale connections checks when using Apache HttpClient 4.5 ? What
is the guidance here ?
> Minor possible documentation issue 
> http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.html
> The above java doc claims that the default timeout that is used before a stale connection
check is performed is 5000 ms. However the source code is setting the value to 2000ms. Please
correct me if I am wrong. 

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message