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

Opster Team

Aug-23, Version: 1.5-1.5

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. If the free disk space falls below this threshold, Elasticsearch will not allocate new shards to that node. To resolve this issue, you can either increase the disk space on the node, delete unnecessary data to free up space, or adjust the disk watermark thresholds in the Elasticsearch settings. However, be cautious with the last option as it could lead to disk space issues.

This guide will help you check for common problems that cause the log ” After allocating; node [{}] would have less than the required {} 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 less than the required {} 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?