[ 
https://issues.apache.org/jira/browse/THRIFT-4130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15937319#comment-15937319
 ] 

ASF GitHub Bot commented on THRIFT-4130:
----------------------------------------

Github user jdpgrailsdev commented on the issue:

    https://github.com/apache/thrift/pull/1212
  
    @jeking3 https://issues.apache.org/jira/browse/THRIFT-4130


> Ensure Apache Http connection is released back to pool after use
> ----------------------------------------------------------------
>
>                 Key: THRIFT-4130
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4130
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>    Affects Versions: 0.9.1, 0.9.2, 0.9.3, 0.10.0, 0.11.0, 0.12.0
>            Reporter: Jonathan Pearlin
>
> There is a connection leak in the THttpClient when using the Apache 
> HttpClient with the PoolingClientConnectionManager. Without calling 
> releaseConnection on the HttpPost object, the connections are never returned 
> to the pool. Under heavy load, this can lead to both failures for subsequent 
> calls to be able to get a connection from the pool and connections being held 
> by the underlying OS, eventually resulting in the inability to grab another 
> client port for outgoing connections. Per the Apache HttpClient 
> examples/documentation:
> "In order to ensure correct deallocation of system resources
> the user MUST either fully consume the response content or abort request
> execution by calling HttpGet#releaseConnection()."
> This might have not been an issue when using the 3.x version of the 
> HttpClient, but it's definitely an issue in the 4.x line. See 
> https://hc.apache.org/httpcomponents-client-4.2.x/quickstart.html for more 
> details.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to