Failed to purge – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Briefly, this error occurs when Elasticsearch is unable to delete or clean up old data or indices. This could be due to insufficient permissions, disk space issues, or a problem with the underlying file system. To resolve this issue, you can try the following: 1) Check and adjust the permissions of the Elasticsearch directories. 2) Free up disk space if it’s running low. 3) Check the health of the file system and fix any issues. 4) Review and adjust the Elasticsearch configuration settings related to data retention and purging.

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

Log Context

Log “failed to purge” classname is IndicesTTLService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                     bulkRequest.add(new DeleteRequest().index(shardToPurge.routingEntry().index()).type(docToPurge.type).id(docToPurge.id).version(docToPurge.version).routing(docToPurge.routing));
                    bulkRequest = processBulkIfNeeded(bulkRequest; false);
                }
                processBulkIfNeeded(bulkRequest; true);
            } catch (Exception e) {
                logger.warn("failed to purge"; e);
            } finally {
                searcher.close();
            }
        }
    }




 

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?