Your repository metadata blob for repository is larger than 5MB Consider moving to a fresh – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.7-7.1

Briefly, this error occurs when the metadata blob for your Elasticsearch repository exceeds the limit of 5MB. This could be due to a large number of snapshots or indices in your repository. To resolve this issue, you can consider deleting old or unnecessary snapshots to reduce the size of the metadata blob. Alternatively, you can create a new repository and move some snapshots there to distribute the load. Also, consider optimizing your snapshot strategy to prevent this issue in the future.

This guide will help you check for common problems that cause the log ” Your repository metadata blob for repository [{}] is larger than 5MB. Consider moving to a fresh ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: metadata, repository, repositories, blobstore.

Log Context

Log “Your repository metadata blob for repository [{}] is larger than 5MB. Consider moving to a fresh” classname is BlobStoreRepository.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

final int len = serialized.length();
                if (len > ByteSizeUnit.KB.toBytes(500)) {
                    logger.debug("Not caching repository data of size [{}] for repository [{}] because it is larger than 500KB in" +
                        " serialized size"; len; metadata.name());
                    if (len > ByteSizeUnit.MB.toBytes(5)) {
                        logger.warn("Your repository metadata blob for repository [{}] is larger than 5MB. Consider moving to a fresh" +
                            " repository for new snapshots or deleting unneeded snapshots from your repository to ensure stable" +
                            " repository behavior going forward."; metadata.name());
                    }
                    // Set empty repository data to not waste heap for an outdated cached value
                    latestKnownRepositoryData.set(null);

 

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?