在Elasticsearch中增加队列的大小? [英] Increasing the size of the queue in Elasticsearch?
问题描述
我一直在查看我的elasticsearch日志,发现错误
Ive been looking at my elasticsearch logs, and I came across the error
org.elasticsearch拒绝执行(队列容量1000)。 search.action.SearchServiceTransportAction$23@6d32fa18
查找错误后,普遍的共识是按照所讨论的增加队列的大小关于此处- https://www.elastic.co/ guide / zh-CN / elasticsearch / reference / current / modules-threadpool.html
After looking up the error, the general and consensus was to increase the size of the queue as talked about here - https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-threadpool.html
我的问题是我实际上该怎么做?
The question I have is how to do I actually do this? Is there aconfiguration file somewhere that I am missing?
推荐答案
要更改队列大小,可以将其添加到每个文件的配置文件中的节点如下:
To change the queue size one could add it in the config file for each of the nodes as follows:
threadpool.search.queue_size:<新队列大小>
。
但是,这还需要重新启动集群。
However this would also require a cluster restart.
在Elasticsearch 2.x之前,您可以通过集群设置api ,但这不会需要重新启动集群,但是Elasticsearch 5.x和更高版本中没有此选项。
Up to Elasticsearch 2.x, you can update via the cluster-setting api and this would not require a cluster restart, however this option is gone with Elasticsearch 5.x and newer.
curl -XPUT _cluster/settings -d '{
"persistent" : {
"threadpool.search.queue_size" : <new_size>
}
}'
您可以按以下方式查询队列大小:
You can query the queue size as follows:
curl< server> / _ cat / thread_pool?v& h = search.queueSize
这篇关于在Elasticsearch中增加队列的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!