问题现象:
{"statusCode":429,"error":"Too Many Requests","message":"[circuit_breaking_exception] [parent] Data too large, data for [<http_request>] would be [2032293344/1.8gb], which is larger than the limit of [2023548518/1.8gb], real usage: [2032293344/1.8gb], new bytes reserved: [0/0b], usages [request=0/0b, fielddata=595064631/567.4mb, in_flight_requests=0/0b, accounting=133685180/127.4mb], with { bytes_wanted=2032293344 & bytes_limit=2023548518 & durability=\"PERMANENT\" }"}
原因:
fielddata 缓存不够
解决方案:
设置fielddata缓存占用jvm内存的:
curl -XPUT "192.168.1.107:9200/_cluster/settings" -H 'Content-Type: application/json' -d '{
"persistent" : {
"indices.breaker.fielddata.limit" : "50%"
}
}'