retrying failed action with response code: 429 ({“type”=>“es_rejected_execution_exception”, “reason”=>“rejected execution of processing of [2270115][indices:data/write/bulk[s][p]]: request: BulkShardRequest [[ami-2022.01.11][1]] containing [88] requests, target allocation id: 5YhxGgIARSCv4iuDjL5lbg, primary term: 1 on EsThreadPoolExecutor[name = node-3/write, queue capacity = 200, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@6350cc09[Running, pool size = 40, active threads = 40, queued tasks = 212, completed tasks = 1345196]]”})
此错误是因为elasticsearch的写入到达瓶颈,拒绝来自logstash的写入请求
解决办法:
首先排除服务器的写入瓶颈,在此只介绍关于elasticsearch的线程池优化
elasticsearch.yml 加入一下配置
thread_pool.write.queue_size:

这篇博客介绍了当遇到Elasticsearch返回429响应码,类型为'es_rejected_execution_exception'时的问题,原因是写入操作达到瓶颈,导致logstash的写入请求被拒绝。解决方案主要集中在Elasticsearch的线程池优化,包括在elasticsearch.yml配置文件中进行相关设置以提升处理能力。

261

被折叠的 条评论
为什么被折叠?



