Michael Moser commented on NIFI-4700:

Hi [~m-hogue] I did some testing of PostHTTP to see if a problem is caused by 
not closing the CloseableHttpClient.  There is some evidence that closing 
CloseableHttpClient, in certain conditions, will shutdown the connection pool 
... here is one 
 I think if you want to manage closing the clients yourself, as of 
HttpComponents version 4.4, you need to call 

During my testing of a PostHTTP with 2 threads sending files to a ListenHTTP, I 
observed that 2 connections were opened and were reused.  netstat did show that 
sometimes, a connection would be closed and a new on opened, so that was a bit 
odd.  But neither lsof nor netstat show any connection leak.  Even when I 
stopped and started both PostHTTP and ListenHttp, netstat and lsof showed 
connections closing, going away, and new ones appearing as needed.

So I'm a bit skeptical that there is a problem here.

> PostHTTP: close client
> ----------------------
>                 Key: NIFI-4700
>                 URL: https://issues.apache.org/jira/browse/NIFI-4700
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: Brandon DeVries
>            Assignee: Michael Hogue
>            Priority: Major
>             Fix For: 1.6.0
> In PostHTTP, the CloseableHttpClient never actually appears to be closed...
> Additionally, we could leverage CloseableHttpResponse to close responses.

This message was sent by Atlassian JIRA

Reply via email to