Waiting for shards evictions to be processed – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.11-8.9

Briefly, this error occurs when Elasticsearch is trying to evict shards but the process is taking longer than expected. This could be due to high load, insufficient resources, or network issues. To resolve this, you can try increasing the node’s resources (CPU, memory), optimizing your queries to reduce load, or checking your network for any issues. Additionally, you can also consider adjusting the cluster’s shard allocation settings or upgrading Elasticsearch to a version that handles shard eviction more efficiently.

This guide will help you check for common problems that cause the log ” waiting for shards evictions to be processed ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, shards, cache.

Log Context

Log “waiting for shards evictions to be processed” classname is CacheService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            allowShardsEvictions = false;
        boolean success = false;
        try {
            if (shardsEvictionsLock.writeLock().tryLock(10L; TimeUnit.SECONDS) == false) {
                logger.warn("waiting for shards evictions to be processed");
                shardsEvictionsLock.writeLock().lock(); // wait indefinitely
            success = true;
        } catch (InterruptedException e) {


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?