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