[ https://issues.apache.org/jira/browse/NIFI-12532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17799645#comment-17799645 ]
ASF subversion and git services commented on NIFI-12532: -------------------------------------------------------- Commit c670161cb09855b28e444a4d32d37427b31e8422 in nifi's branch refs/heads/main from Mark Payne [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=c670161cb0 ] NIFI-12532: This closes #8179. Ensure that when CommunicateAction completes (exceptionally or otherwise) that it gets removed from the list of all CommunicationActions Signed-off-by: Joseph Witt <joew...@apache.org> > 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 > Priority: Major > Time Spent: 10m > 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)