问题:自从从 ES-5.4 升级到 ES-7.2 后,当我尝试从我的多线程 Java 应用程序(使用java 客户端)
编写并发批量请求(或/和搜索请求)时,我开始收到“数据太大”错误elasticsearch-rest-high-level-client-7.2.0.jar
到 2-4 个节点的 ES 集群。
我的 ES 配置:
Elasticsearch version: 7.2
custom configuration in elasticsearch.yml:
thread_pool.search.queue_size = 20000
thread_pool.write.queue_size = 500
I use only the default 7.x circuit-breaker values, such as:
indices.breaker.total.limit = 95%
indices.breaker.total.use_real_memory = true
network.breaker.inflight_requests.limit = 100%
network.breaker.inflight_requests.overhead = 2
来自 elasticsearch.log 的错误:
{
"error": {
"root_cause": [
{
"type": "circuit_breaking_exception",
"reason": "[parent] Data too large, data for [<http_request>] would be [3144831050/2.9gb], which is larger than the limit of [3060164198/2.8gb], real usage: [3144829848/2.9gb], new bytes reserved: [1202/1.1kb]",
"bytes_wanted": 3144831050,
"bytes_limit": 3060164198,
"durability": "PERMANENT"
}
],
"type": "circuit_breaking_exception",
"reason": "[parent] Data too large, data for [<http_request>] would be [3144831050/2.9gb], which is larger than the limit of [3060164198/2.8gb], real usage: [3144829848/2.9gb], new bytes reserved: [1202/1.1kb]",
"bytes_wanted": 3144831050,
"bytes_limit": 3060164198,
"durability": "PERMANENT"
},
"status": 429
}
想法:
我很难确定问题的根源。
当使用 <=8gb 堆大小的 ES 集群节点(在 <=16gb vm 上)时,问题变得非常明显,因此,一个明显的解决方案是增加节点的内存。
但我觉得增加内存只会隐藏问题。
问题:
我想了解哪些情况可能导致此错误?
我可以采取什么措施来正确处理它?
(更改断路器值,更改 es.yml 配置,更改/限制我的 ES 请求)