After allocating node would have more than the allowed free disk threshold free preventing allocation – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Briefly, this error occurs when Elasticsearch tries to allocate shards to a node, but the node doesn’t have enough free disk space. Elasticsearch has a disk watermark threshold to prevent disk space issues. To resolve this, you can either increase the disk space on the node, delete unnecessary data, or adjust the disk watermark thresholds. However, be cautious with the last option as it could lead to disk space issues. You can also consider adding more nodes to your cluster to distribute the data.

This guide will help you check for common problems that cause the log ” after allocating; node [{}] would have more than the allowed {} free disk threshold ({} free); preventing allocation ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: allocation, cluster, node, routing and threshold.

Log Context

Log “after allocating; node [{}] would have more than the allowed {} free disk threshold ({} free); preventing allocation” classname is DiskThresholdDecider.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

node.nodeId(); freeBytesThresholdHigh; freeBytesAfterShard);
            return allocation.decision(Decision.NO; NAME; "after allocation less than required [%s] free on node; free: [%s]";
                    freeBytesThresholdLow; new ByteSizeValue(freeBytesAfterShard));
        }
        if (freeSpaceAfterShard 

 

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?