Unable to add the event too many requests – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 8.8-8.9

Briefly, this error occurs when Elasticsearch is overwhelmed with too many requests than it can handle at a given time, causing it to throttle incoming requests. This is often due to high indexing or search load. To resolve this issue, you can: 1) Increase the capacity of your Elasticsearch cluster by adding more nodes. 2) Optimize your indexing operations by using bulk requests or reducing the indexing rate. 3) Use the “retry” feature in your client to handle these errors and retry the request after a delay. 4) Monitor your cluster to identify and manage high load situations.

This guide will help you check for common problems that cause the log ” Unable to add the event: too many requests. ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.

Log Context

Log “Unable to add the event: too many requests.” class name is AnalyticsEventEmitter.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 }
 } catch (IOException e) {
 listener.onFailure(new ElasticsearchException("Unable to parse the event."; e));
 } catch (EsRejectedExecutionException e) {
 listener.onFailure(
 new ElasticsearchStatusException("Unable to add the event: too many requests."; RestStatus.TOO_MANY_REQUESTS)
 );  if (dropEvent.compareAndSet(false; true)) {
 logger.warn("Bulk processor is full. Start dropping events.");
 }

 

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?