1

I have an embedded instance of an elasticsearch node (no tcp) used to provide a fast indexed search engine on a big and complex relational database.

The index is kept aligned with the db by a background thread (this is a very common usage pattern for ES).

The problem is that after a while we start seeing exception like the following, and we have to stop and restart the server to make it work again:

Caused by: EsRejectedExecutionException[rejected execution of org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryPhase$1@1133ea1 on EsThreadPoolExecutor[index, queue capacity = 200, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@1ff3ea[Running, pool size = 2, active threads = 2, queued tasks = 200, completed tasks = 5]]]
at org.elasticsearch.common.util.concurrent.EsAbortPolicy.rejectedExecution(EsAbortPolicy.java:50)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
at org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor.execute(EsThreadPoolExecutor.java:85)
at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryPhase.routeRequestOrPerformLocally(TransportReplicationAction.java:444)
at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryPhase.doRun(TransportReplicationAction.java:386)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
at org.elasticsearch.action.support.replication.TransportReplicationAction.doExecute(TransportReplicationAction.java:120)
at org.elasticsearch.action.index.TransportIndexAction.innerExecute(TransportIndexAction.java:135)
at org.elasticsearch.action.index.TransportIndexAction.doExecute(TransportIndexAction.java:119)
at org.elasticsearch.action.index.TransportIndexAction.doExecute(TransportIndexAction.java:66)
at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:70)
at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:58)

No other exception are visibile in the logs except this one. Seams like something il locked inside ES and when it reaches the fatal number of 200 stuck "things" it will stop working.

Elastic search is version : 2.1.1

  • looks like case of too many requests, possible duplicate of http://stackoverflow.com/questions/27793530/esrejectedexecutionexception-in-elasticsearch-for-parallel-search – ChintanShah25 Jan 27 '16 at 02:21
  • That's a suspect we had. But seams not the case. We're indexing one record a time every 5 secs. Records are simple json documents. Indexer is a single thread. No way this is overloading ES. – Vittorio Ballestra Jan 28 '16 at 10:15

0 Answers0