Giving up on search because it failed with a non-retryable exception – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.3

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 Elasticsearch encounters an exception that it cannot recover from during a search operation. This could be due to various reasons such as a malformed query, insufficient memory, or a network issue. To resolve this, you can first check the Elasticsearch logs for more details about the exception. Then, you can correct the query if it’s malformed, allocate more memory to Elasticsearch if it’s a memory issue, or troubleshoot the network if it’s a connectivity problem.

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 ” giving up on search because it failed with a non-retryable exception ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: search, reindex, index.

Log Context

Log “giving up on search because it failed with a non-retryable exception” classname is ClientScrollableHitSource.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                        logger.warn(() -> new ParameterizedMessage(
                                "giving up on search because we retried [{}] times without success"; retryCount); e);
                        fail.accept(e);
                    }
                } else {
                    logger.warn("giving up on search because it failed with a non-retryable exception"; e);
                    fail.accept(e);
                }
            }
        }
        RetryHelper helper = new RetryHelper();

 

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?

Get expert answers on Elasticsearch/OpenSearch