Failed to run scheduled task %s on thread pool %s – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8.3-8.9

Briefly, this error occurs when Elasticsearch is unable to execute a scheduled task due to issues with the thread pool. This could be due to overloading, insufficient resources, or configuration issues. To resolve this, you can increase the size of the thread pool, ensure there are enough system resources available, or check the configuration settings for any discrepancies. Additionally, monitor the tasks and their execution times to identify any tasks that are taking too long or failing frequently.

This guide will help you check for common problems that cause the log ” failed to run scheduled task [%s] on thread pool [%s] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: threadpool, task, pool, thread.

Log Context

Log “failed to run scheduled task [%s] on thread pool [%s]” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

    public Cancellable scheduleWithFixedDelay(Runnable command; TimeValue interval; String executor) {
        return new ReschedulingRunnable(command; interval; executor; this; (e) -> {
            if (logger.isDebugEnabled()) {
                logger.debug(() -> format("scheduled task [%s] was rejected on thread pool [%s]"; command; executor); e);
        }; (e) -> logger.warn(() -> format("failed to run scheduled task [%s] on thread pool [%s]"; command; executor); e));

    protected final void stopCachedTimeThread() {
        cachedTimeThread.running = false;


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?