ES报错:[parent] Data too large, data for [<http_request>] would be larger than limit of XXXX

当es这个错误的时候 :[parent] Data too large, data for [<http_request>] would be larger than limit of [23941899878/22.2gb], with { bytes_wanted=23941987633 bytes_limit=23941899878 }


通常原因是在于fielddata的内存被占用完了,其他索引无法分配更多的内存。

另外,查询语句写的不好,单个请求聚合查询的数据太多,同样会大量占用内存,一个请求就OOM了。所以,注意统计的时候聚和桶数不要无限制。

解决:

kibana里执行下这俩命令:

#限定内存使用百分比 indices.fielddata.cache.size: 20%,超出限制,清除内存已有fielddata数据。

#默认无限制,限制内存使用,但是会导致频繁evict和reload,大量IO性能损耗,以及内存碎片和gc

PUT _cluster/settings
{  
	"persistent": {    
		"indices.breaker.fielddata.limit": "30%"   
	}
}

#清理集群所有使用内存缓存
POST /_cache/clear

如果kibana进不去,执行下面curl

注意:账号、密码

#限定内存使用百分比 indices.fielddata.cache.size: 20%,超出限制,清除内存已有fielddata数据。

curl  -u 账号:密码 -XPUT "http://localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'{  "persistent": {    "indices.breaker.fielddata.limit": "20%"   }}'


#清理集群所有使用内存缓存
curl  -u 账号:密码 -XPOST "http://localhost:9200/_cache/clear"

此时,问题基本解决!!

猜你喜欢

转载自blog.csdn.net/m0_71867302/article/details/131520964