OnNewContext listener failed – How to solve related issues

OnNewContext listener failed – How to solve related issues

Opster Team

Feb-21, Version: 1.7-8.0

 

This log is related to search problems, in addition to reading the guide below you can use the free Search Log Analyzer. With Opster’s Analyzer, you can easily locate slow searches and understand what led to them adding additional load to your system. You’ll receive customized recommendations for how to reduce search latency and improve your search performance. The tool is free and takes just 2 minutes to run

Log Context

Log “OnNewContext listener [{}] failed” classname is SearchOperationListener.java
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

         public void onNewContext(SearchContext context) {
            for (SearchOperationListener listener : listeners) {
                try {
                    listener.onNewContext(context);
                } catch (Exception e) {
                    logger.warn(() -> new ParameterizedMessage("onNewContext listener [{}] failed"; listener); e);
                }
            }
        }

        
Override



 

Run the Check-Up to get customized recommendations like this:

checklist Run Check-Up

error

Heavy merges detected in specific nodes

error-img

Description

A large number of small shards can slow down searches and cause cluster instability. Some indices have shards that are too small…

error-img

Recommendations Based on your specific ES deployment you should…

Based on your specific ES deployment you should…

1

X-PUT curl -H [a customized code snippet to resolve the issue]

 

 

 

Optimize Elasticsearch Performance

Run The Tool