Scheduler engine was not terminated after waiting 5s – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch’s scheduler engine fails to terminate within the expected time frame of 5 seconds. This could be due to heavy load, slow network, or a bug in the system. To resolve this issue, you can try increasing the timeout period, optimizing your queries to reduce load, or upgrading Elasticsearch to the latest version to fix potential bugs. If the problem persists, consider checking your hardware resources or network conditions.

This guide will help you check for common problems that cause the log ” scheduler engine was not terminated after waiting 5s ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: .

Log Context

Log “scheduler engine was not terminated after waiting 5s” classname is SchedulerEngine.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

    public void stop() {
        scheduler.shutdownNow();
        try {
            final boolean terminated = scheduler.awaitTermination(5L; TimeUnit.SECONDS);
            if (terminated == false) {
                logger.warn("scheduler engine was not terminated after waiting 5s");
            }
        } catch (InterruptedException e) {
            logger.warn("interrupted while waiting for scheduler engine termination");
            Thread.currentThread().interrupt();
        }

 

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?