magento 2.4 ElasticSuite Data too large

目录

错误提示: 

解决方法:

我的配置:


错误提示: 

更新magento index 的时候提示数据太大,索引出错。导致前台商品目录看不到商品。 

ElasticSuite Thesaurus Indexing index process unknown error:
{"error":{"root_cause":[{"type":"circuit_breaking_exception","reason":"[parent] Data too large, data for [<http_request>] would be [1052010070/1003.2mb], which is larger than the limit of [1020054732/972.7mb], real usage: [1052008896/1003.2mb], new bytes reserved: [1174/1.1kb], usages [request=72/72b, fielddata=2009513/1.9mb, in_flight_requests=1174/1.1kb, model_inference=0/0b, accounting=26789840/25.5mb]","bytes_wanted":1052010070,"bytes_limit":1020054732,"durability":"PERMANENT"}],"type":"circuit_breaking_exception","reason":"[parent] Data too large, data for [<http_request>] would be [1052010070/1003.2mb], which is larger than the limit of [1020054732/972.7mb], real usage: [1052008896/1003.2mb], new bytes reserved: [1174/1.1kb], usages [request=72/72b, fielddata=2009513/1.9mb, in_flight_requests=1174/1.1kb, model_inference=0/0b, accounting=26789840/25.5mb]","bytes_wanted":1052010070,"bytes_limit":1020054732,"durability":"PERMANENT"},"status":429}

临时调整"indices.breaker.fielddata.limit":"100%" 也已经超了

​curl -XPUT -H "Content-Type:application/json" -d '{"persistent":{"indices.breaker.fielddata.limit":"100%"}}' 'http://127.0.0.1:9200/_cluster/settings'

解决方法:

参考https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html

 添加启动参数,官网参数是10g,本人用的服务器只有8g内存开不了,有试过5g不过会导致系统可用内存告急,所以改用3g

ES_JAVA_OPTS="-Xms3g -Xmx3g" ./bin/elasticsearch 

supervisor服务配置文件elasticsearch.conf

[program:elasticsearch]
command=/usr/share/elasticsearch/bin/elasticsearch
user=elasticsearch
directory=/usr/share/elasticsearch/bin/
autostart=true
autorestart=true
environment=ES_JAVA_OPTS="-Xms3g -Xmx3g",JAVA_HOME=/usr/share/elasticsearch/jdk/
startretries=3
stopsignal=INT
startsecs=10
stdout_logfile=/var/log/elasticsearch/elasticsearch.log
stderr_logfile=/var/log/elasticsearch/elasticsearch.log

更新服务配置

supervisorctl update

等待服务重启完成问题解决

我的配置:

/etc/elasticsearch/elasticsearch.yml

path.logs: /var/log/elasticsearch
# 避免发生OOM
indices.breaker.total.limit: 70%

# 最久未使用的 fielddata 会被回收  
indices.fielddata.cache.size: 25%

# fielddata 断路器
indices.breaker.fielddata.limit: 40%

# request 断路器
indices.breaker.request.limit: 40%

network.host: localhost

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值