ignite icon indicating copy to clipboard operation
ignite copied to clipboard

[Ignite v2.17.0] Memory leak on HeavyQueriesTracker

Open arroyoh opened this issue 7 months ago • 0 comments

Following the upgrade of our Apache Ignite cluster from version 2.16.0 to 2.17.0, we have observed a significant increase in JVM heap memory consumption, which points to a potential memory leak.

Through detailed investigation and heap dump analysis from our production pods, we managed to pinpoint the issue to the HeavyQueriesTracker class. This class contains a ConcurrentHashMap that tracks queries based on their time consumption.

Our analysis revealed that this map was responsible for retaining nearly 80% of the used heap memory—approximately 600 MB of data.

Digging deeper, we discovered that all instances of TrackableQuery held by this map were in a suspended state. In this state, query timing stops, but it remains in the map. For reasons still unclear, tracking for these queries never terminates. Consequently, this causes the query map to retain those queries indefinitely, resulting in its size growing without bounds and consuming more memory over time.

Reverting our cluster version to 2.16.0 solved the issue.

We suspect this issue was introduced in version 2.17.0 through a specific pull request (PR) that implemented significant changes to the HeavyQueriesTracker class

Image

arroyoh avatar May 15 '25 13:05 arroyoh