Requested thread pool size for is too large setting to maximum instead – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Briefly, this error occurs when the requested thread pool size in Elasticsearch exceeds the maximum limit set by the system. This could potentially slow down the system due to excessive resource usage. To resolve this issue, you can either reduce the requested thread pool size to fit within the maximum limit or increase the maximum limit if your system resources allow. However, be cautious not to set the limit too high as it may lead to resource exhaustion. It’s also advisable to monitor your system’s performance regularly to ensure optimal operation.

This guide will help you check for common problems that cause the log ” requested thread pool size [{}] for [{}] is too large; setting to maximum [{}] instead ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: pool, thread and threadpool.

Log Context

Log “requested thread pool size [{}] for [{}] is too large; setting to maximum [{}] instead” classname is ThreadPool.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

         if ((name.equals(Names.BULK) || name.equals(Names.INDEX)) && size > availableProcessors) {
            // We use a hard max size for the indexing pools; because if too many threads enter Lucene's IndexWriter; it means
            // too many segments written; too frequently; too much merging; etc:
            // TODO: I would love to be loud here (throw an exception if you ask for a too-big size); but I think this is dangerous
            // because on upgrade this setting could be in cluster state and hard for the user to correct?
            logger.warn("requested thread pool size [{}] for [{}] is too large; setting to maximum [{}] instead";
                        size; name; availableProcessors);
            size = availableProcessors;
        }

        return size;




 

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?