Failed to parse auto expand replicas – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Briefly, this error occurs when Elasticsearch is unable to interpret the “auto_expand_replicas” setting. This setting is used to automatically adjust the number of replica shards in an index. The error might be due to an incorrect value or format. To resolve this issue, ensure that the “auto_expand_replicas” setting is correctly formatted. It should be a string containing a single number, or a range in the format “lower-bound-upper-bound”. For example, “0-5” or “2”. Also, ensure that the lower bound is less than or equal to the upper bound.

This guide will help you check for common problems that cause the log ” [{}] failed to parse auto expand replicas ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: cluster, metadata and settings.

Log Context

Log “[{}] failed to parse auto expand replicas” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :


                } catch (Exception e) {
                    logger.warn("[{}] failed to parse auto expand replicas"; e; indexMetaData.getIndex());

        if (nrReplicasChanged.size() > 0) {


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?