[
https://issues.apache.org/jira/browse/NIFI-12532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17887964#comment-17887964
]
Michael W Moser commented on NIFI-12532:
----------------------------------------
I found this yesterday and it seems important enough to include in 1.x. It
cherry-picks cleanly into support/nifi-1.x (with 1 minor import statement
difference). If it builds cleanly with unit tests and integration tests, then
I plan to merge this to 1.x.
> Possible memory leak in ConnectionLoadBalanceServer
> ---------------------------------------------------
>
> Key: NIFI-12532
> URL: https://issues.apache.org/jira/browse/NIFI-12532
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Stijn Caerts
> Assignee: Mark Payne
> Priority: Major
> Fix For: 2.0.0-M2
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The ConnectionLoadBalanceServer possibly contains a memory leak.
> When analyzing a heap dump of a NiFi node in our clustered setup with version
> 1.16.3, a large part of the used memory was related to the
> {{ConnectionLoadBalanceServer}}.
> It had a retained size of 1,770,787,761 B (25.1%), with 106,710
> {{CommunicationAction}} objects taking up most of that size 1,770,787,608 B
> (25.1%).
> I checked the code of the {{ConnectionLoadBalanceServer}} to try to
> understand why it uses this much memory. This is when I noticed that
> {{CommunicationAction}} objects are only removed when the
> {{ConnectionLoadBalanceServer}} is stopped, creating a possible memory leak.
> Although we're not running the most recent version of NiFi, this is still
> present in the current version of the code.
> https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/clustered/server/ConnectionLoadBalanceServer.java#L110
--
This message was sent by Atlassian Jira
(v8.20.10#820010)