Failed to clear memory tracker cache via machine learning reset feature API – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.14-7.15

Briefly, this error occurs when Elasticsearch is unable to clear the memory tracker cache using the machine learning reset feature API. This could be due to insufficient permissions, a malfunctioning API, or a network issue. To resolve this, you can try the following: 1) Check and adjust the user permissions to ensure they have the necessary rights to perform this action. 2) Verify the functionality of the API and fix any issues. 3) Check the network connectivity between the Elasticsearch cluster and the machine learning node. 4) Restart the Elasticsearch service to clear any temporary issues.

This guide will help you check for common problems that cause the log ” failed to clear memory tracker cache via machine learning reset feature API ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, cache, memory.

Log Context

Log “failed to clear memory tracker cache via machine learning reset feature API” classname is MachineLearning.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                if (results.values().stream().allMatch(b -> b)) {
                    if (memoryTracker.get() != null) {
                        memoryTracker.get().awaitAndClear(ActionListener.wrap(
                            cacheCleared -> SystemIndexPlugin.super.cleanUpFeature(clusterService; client; unsetResetModeListener);
                            clearFailed -> {
                                logger.error("failed to clear memory tracker cache via machine learning reset feature API"; clearFailed);
                                SystemIndexPlugin.super.cleanUpFeature(clusterService; client; unsetResetModeListener);
                            }
                        ));
                        return;
                    }

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?