TopHitsAggregator objects are not Garbage Collected

Hi,Recently we saw the OOM on our ES instance. On Checking the Heap Dump in VisulaVM we observed large number of instances of org.apache.lucene.search.ScoreDoc in the HEAP - 41,984,154

The dominators by Retained size (Objects remaining in HEAP after GC) shows large percentage of heap being consumed by org.elasticsearch.search.aggregations.metrics.TopHitsAggregator.
Any pointers what can be the root cause of these Objects not being Garbage Collected? We are using RestHighLevelClient to query ES. We never close the client as we use the same client for continuous indexing as well.

Any Hints Please.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.