In the elasticsearch.yml
config I'm setting the search thread_pool
size to be 4200
, like so:
thread_pool.search.queue_size: 4200
But the other day I received the following error:
ElasticsearchStatusException[Elasticsearch exception [type=search_phase_execution_exception, reason=]]; nested:
ElasticsearchException[Elasticsearch exception [
type=es_rejected_execution_exception,
reason=rejected execution of org.elasticsearch.common.util.concurrent.TimedRunnable@4993756d on
QueueResizingEsThreadPoolExecutor[
name = es-live-7/search,
queue capacity = 1000,
min queue capacity = 1000,
max queue capacity = 1000,
frame size = 2000,
targeted response rate = 1s,
task execution EWMA = 10.5ms,
adjustment amount = 50,
org.elasticsearch.common.util.concurrent.QueueResizingEsThreadPoolExecutor@28b39f6f[Running,
pool size = 13,
active threads = 13,
queued tasks = 1088,
completed tasks = 89917206]]]];
Why is it reporting the queue capacity as 1000 and not 4200?
I know that 1000 is the default, so did my config not work?
How can I enforce a minimum queue size of 4200? Do I need to set:
thread_pool.search.min_queue_size: 4200
as well?
Or do I just need to change the type
of queue to fixed
?
If so, where is the documentation on setting that config?
I just executed GET /_cluster/settings?include_defaults=true
then I get this:
"search": {
"max_queue_size": "1000",
"queue_size": "4200",
"size": "13",
"auto_queue_frame_size": "2000",
"target_response_time": "1s",
"min_queue_size": "1000"
},
Why would the max_queue_size default to be above the queue_size?
I think what I need to do is change my configuration to:
thread_pool:
search:
min_queue_size: 4200
max_queue_size: 4200
queue_size: 4200
Can someone please confirm?
Sorry for the rambling post!
Thanks!