Maximum snapshot retention deletion time reached time spent – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.5-7.1

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch operation.

Briefly, this error occurs when the time spent on deleting old snapshots in Elasticsearch exceeds the maximum snapshot retention deletion time. This could be due to a large number of snapshots or slow disk I/O. To resolve this issue, you can increase the maximum snapshot retention deletion time, reduce the number of snapshots, or improve the disk I/O performance. Also, ensure that the Elasticsearch cluster is not under heavy load, which could slow down the deletion process.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

This guide will help you check for common problems that cause the log ” maximum snapshot retention deletion time reached; time spent: [{}]; ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: snapshot, plugin.

Log Context

Log “maximum snapshot retention deletion time reached; time spent: [{}];” classname is SnapshotRetentionTask.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

long finishTime = nowNanoSupplier.getAsLong();
                TimeValue deletionTime = TimeValue.timeValueNanos(finishTime - deleteStartTime);
                logger.debug("elapsed time for deletion of [{}] snapshot: {}"; info.snapshotId(); deletionTime);
                TimeValue totalDeletionTime = TimeValue.timeValueNanos(finishTime - startTime);
                if (totalDeletionTime.compareTo(maximumTime) > 0) {
                    logger.info("maximum snapshot retention deletion time reached; time spent: [{}];" +
                            " maximum allowed time: [{}]; deleted [{}] out of [{}] snapshots scheduled for deletion; failed to delete [{}]";
                        totalDeletionTime; maximumTime; deleted; count; failed);
                    slmStats.deletionTime(totalDeletionTime);
                    slmStats.retentionTimedOut();
                    return;

 

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?