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

Joseph Witt commented on NIFI-2669:
-----------------------------------

talked to mark to understand the core change of value here.  Most of it just 
looks like variable name updates and logging improvements.  But the golden 
nugget is here

  
https://github.com/markap14/nifi/blob/8a079a1b889b79d6dcd0546f5e8673fe13cd7eb0/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/http/HttpClient.java#L195-L200

The problem was that previously the transaction initialized but not properly 
error handled and resources weren't being cleaned up.  You can see that here
   
https://github.com/apache/nifi/pull/949/files#diff-5bfaf3b87cc134b1d676a01f8a727953L195

The net effect was a leak of the internal buffer it created causing memory 
leakage, a leak of threads causing CPU exhaustion - which caused the system to 
grind to nothingness.  Doing some offline testing as well but this is clearly 
an important fix.

> HTTP-based Site-to-Site leaks threads/memory when unable to communicate with 
> remote instance
> --------------------------------------------------------------------------------------------
>
>                 Key: NIFI-2669
>                 URL: https://issues.apache.org/jira/browse/NIFI-2669
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Blocker
>             Fix For: 1.0.0
>
>
> I am using HTTP-based site-to-site to communicate with a remote instance of 
> NiFi. I am seeing problems communicating, which is okay. But I am seeing CPU 
> load of 600-700 on my system with 32 cores. I am also seeing in a thread dump 
> 10's to 100's threads with the name "I/O dispatcher" and am seeing OOME's. A 
> heap dump shows that the OOME is caused by 64K byte arrays, each being filled 
> with 0's. The byte[] is coming from class 
> org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to