Still pending deletes present for shards – retrying – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch is trying to delete some shards but can’t because they are still in use or locked. This could be due to ongoing indexing operations or other processes. To resolve this issue, you can try the following: 1) Wait for the ongoing operations to complete and then retry the delete operation. 2) Check for any locks on the shards and remove them. 3) Restart the Elasticsearch node to clear any pending operations. Always ensure to have a backup before performing these operations to prevent data loss.

This guide will help you check for common problems that cause the log ” {} still pending deletes present for shards {} – retrying ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: indices, shards.

Log Context

Log “{} still pending deletes present for shards {} – retrying” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                    if (remove.isEmpty() == false) {
                        logger.warn("{} still pending deletes present for shards {} - retrying"; index; remove.toString());
                        sleepTime = Math.min(maxSleepTimeMs; sleepTime * 2); // increase the sleep time gradually
                        logger.debug("{} schedule pending delete retry after {} ms"; index; sleepTime);
                } while ((System.nanoTime() - startTimeNS) 


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?