I'm using Elasticsearch 5.5.1 with Java REST Client.
My application adds documents only via regular API (i.e. POST /index/type/id). When I put the system under load test, I sometimes get the following errors.
Caused by: org.elasticsearch.client.ResponseException: POST https://localhost:9200/myindex/mytype/3227977?parent=157028&pretty=false: HTTP/1.1 429 Too Many Requests
{"error":{"root_cause":[{"type":"es_rejected_execution_exception","reason":"rejected execution of org.elasticsearch.transport.TransportService$7@117c3178 on EsThreadPoolExecutor[bulk, queue capacity = 200, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@38a5c63b[Running, pool size = 4, active threads = 4, queued tasks = 200, completed tasks = 4389787]]"}],"type":"es_rejected_execution_exception","reason":"rejected execution of org.elasticsearch.transport.TransportService$7@117c3178 on EsThreadPoolExecutor[bulk, queue capacity = 200, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@38a5c63b[Running, pool size = 4, active threads = 4, queued tasks = 200, completed tasks = 4389787]]"},"status":429}
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:354)
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:343)
As shown in the above stack trace, the error mentions "bulk" thread pool rather than "index" thread pool. Given that I'm not using bulk API at all, how is this possible?
Also, when I query thread pool settings, the following information is returned.
"thread_pool" : {
"bulk" : {
"threads" : 4,
"queue" : 0,
"active" : 0,
"rejected" : 0,
"largest" : 4,
"completed" : 305735
},
"index" : {
"threads" : 0,
"queue" : 0,
"active" : 0,
"rejected" : 0,
"largest" : 0,
"completed" : 0
},
.....
The queue size for "bulk" thread pool is set to 0 rather than 200 shown in the error message, Why is it different? What is the meaning of 0? I could not find this information in the documentation.
Likewise, the settings are all 0 for "index" thread pool. What is its meaning? When I looked at the threads in Elasticsearch server (after it cooled down), I didn't see any threads with the "index" in their names. Is that because "index" thread pool isn't a fixed size pool?
Any help would be highly appreciated.
/Jong