问题:
自从升级从ES-5.4到ES-7.2后,我在尝试使用多线程的Java应用程序(使用elasticsearch-rest-high-level-client-7.2.0.jar
Java客户端)向一个由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(在<=16gb虚拟机上)的ES群集节点时,问题变得非常明显,因此,一个明显的解决方案是增加节点的内存。
但我觉得增加内存只是掩盖了问题。
问题:
我想了解什么情况可能导致这个错误?
我应该采取什么行动才能正确处理它?
(更改断路器值、更改es.yml配置、更改/限制我的ES请求)