Stijn Caerts created NIFI-12532: ----------------------------------- Summary: 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
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)