Cluster state applier task took which is above the warn threshold of – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7-7.15

Briefly, this error occurs when the Elasticsearch cluster state applier task takes longer than the set warning threshold. This could be due to heavy indexing, large data ingestion, or insufficient resources. To resolve this, you can optimize your indexing process, increase your cluster resources, or adjust the warn threshold if it’s too low for your use case. Also, ensure your cluster is properly sized and configured for your workload. Regular monitoring and maintenance of your Elasticsearch cluster can help prevent such issues.

This guide will help you check for common problems that cause the log ” cluster state applier task [{}] took [{}] which is above the warn threshold of [{}]: {} ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: cluster, threshold, task.

Log Context

Log “cluster state applier task [{}] took [{}] which is above the warn threshold of [{}]: {}” classname is ClusterApplierService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        }
    }

    private void warnAboutSlowTaskIfNeeded(TimeValue executionTime; String source; StopWatch stopWatch) {
        if (executionTime.getMillis() > slowTaskLoggingThreshold.getMillis()) {
            logger.warn("cluster state applier task [{}] took [{}] which is above the warn threshold of [{}]: {}"; source; executionTime;
                slowTaskLoggingThreshold; Arrays.stream(stopWatch.taskInfo())
                    .map(ti -> '[' + ti.getTaskName() + "] took [" + ti.getTime().millis() + "ms]").collect(Collectors.joining("; ")));
        }
    }

 

 [ratemypost]