Failed to close persistent cache index writer – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.11-8.9

Briefly, this error occurs when Elasticsearch is unable to close the index writer for the persistent cache due to issues like insufficient disk space, file system errors, or abrupt termination of the Elasticsearch process. To resolve this, you can try freeing up disk space, checking for file system errors and fixing them, or ensuring a graceful shutdown of Elasticsearch. Additionally, you may need to manually delete the persistent cache files if they have become corrupted.

This guide will help you check for common problems that cause the log ” failed to close persistent cache index writer ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, index, persistent, cache.

Log Context

Log “failed to close persistent cache index writer” classname is PersistentCache.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            }
        } catch (IOException e) {
            try {
                close();
            } catch (Exception e2) {
                logger.warn("failed to close persistent cache index writer"; e2);
                e.addSuppressed(e2);
            }
            throw e;
        } finally {
            closeIfAnyIndexWriterHasTragedyOrIsClosed();

 

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?