繁体   English   中英

显示和更改参数 threadpool.bulk.queue_size

[英]show and change parameter threadpool.bulk.queue_size

我正在使用 elasticsearch 版本 6.7.2 并且出现错误 429

{
    "error": {
        "root_cause": [
            {
                "type": "remote_transport_exception",
                "reason": "[localhost][localhost:9300][indices:data/write/bulk[s]]"
            }
        ],
        "type": "es_rejected_execution_exception",
        "reason": "rejected execution of processing of [682604930][indices:data/write/bulk[s][p]]: request: BulkShardRequest [[hboauth2-2020.04.20-000113][0]] containing [index {[hboauth2][_doc][yRuEnHEBn6z33bhuCGjZ], source[{\"Action\":\"Service UpdateUserStatus Start\",\"ClientID\":\"\",\"Code\":0,\"Component\":\"UpdateUserStatus\",\"CustomMessage\":\"\",\"Data\":\"null\",\"LogDate\":1587468830939,\"Message\":\"{OK false}\",\"Type\":\"Info\",\"UserID\":\"4c220ab2-282d-466f-a9f5-da0e59b7b803\"}]}], target allocation id: wZFZUPi5TnSYFg-BNonHug, primary term: 1 on EsThreadPoolExecutor[name = localhost/write, queue capacity = 200, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@744831b0[Running, pool size = 16, active threads = 16, queued tasks = 224, completed tasks = 264136589]]"
    },
    "status": 429
}

我找到了解决问题的方法,但是在我的版本中找不到参数threadpool.bulk.queue_size。 你能帮我找到和改变这个参数吗

官方示例所示,您可以使用 elasticsearch.config 中的以下配置更改批量线程池的队列大小或更新集群设置。

请注意,写入线程池用于批量请求,如同一链接中所述:

write 用于单文档索引/删除/更新和批量请求 线程池类型的大小固定为可用处理器数,queue_size 为 200。此池的最大大小为 1 + 可用处理器数。

thread_pool:
    write:
        size: 30. --> no if threads in your case, its 16 as shown in exception
        queue_size: 400 --> here you can add `queue_size`

还提到了有关更改这些设置的说明

可以通过设置特定类型的参数来更改特定的线程池; 例如,改变写线程池中的线程数:

编辑:正如@val 在评论部分指出的那样,添加关于更改这些默认设置的免责声明。

请了解这些设置的技术细节和影响,因为这些通常不建议更改,更多信息请参阅此官方博客

我正在寻找如何更改 thread_pool.write.queue_size 并首先找到 2 个解决方案

curl -XPUT  _cluster/settings -d '{
    "persistent" : {
        "thread_pool.write.queue_size" : <new_size>
    }
}'

第二次写入 elasticsearch.yaml 参数 thread_pool.write.queue_size

所有解决方案都对我的版本 6.2.7 有效吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM