DLM is issuing a request to force merge index – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8.9-8.9

Briefly, this error occurs when Elasticsearch’s Data Lifecycle Management (DLM) is trying to force merge an index. This process is used to reduce the number of segments in an index, improving search performance but it can be resource-intensive. To resolve this, you can adjust the DLM policy to avoid force merging during peak hours. Alternatively, you can increase the resources of your Elasticsearch cluster to handle the load, or consider splitting your data into more indices to reduce the impact of force merging.

This guide will help you check for common problems that cause the log ” DLM is issuing a request to force merge index [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index, merge, request.

Log Context

Log “DLM is issuing a request to force merge index [{}]” classname is DataLifecycleService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

     * update has been made; or when the forcemerge fails or the write of the to the cluster state fails.
     */
    private void forceMergeIndex(ForceMergeRequest forceMergeRequest; ActionListener listener) {
        assert forceMergeRequest.indices() != null && forceMergeRequest.indices().length == 1 : "DLM force merges one index at a time";
        final String targetIndex = forceMergeRequest.indices()[0];
        logger.info("DLM is issuing a request to force merge index [{}]"; targetIndex);
        client.admin().indices().forceMerge(forceMergeRequest; new ActionListener() {
            @Override
            public void onResponse(ForceMergeResponse forceMergeResponse) {
                if (forceMergeResponse.getFailedShards() > 0) {
                    DefaultShardOperationFailedException[] failures = forceMergeResponse.getShardFailures();

 

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?