「Elasticsearch」- 常见错误列表 @20210422
#4 Data too large
I got issue about “Data too large”
问题描述:
在 Kibana 中,返回如下错误信息:
[circuit_breaking_exception] [parent] Data too large, data for [<http_request>] would be [1004465832/957.9mb], which is larger than the limit of [986061209/940. 3mb], real usage: [1004465832/957.9mb], new bytes reserved: [0/0b], with { bytes _wanted=1004465832 & bytes_limit=986061209 & durability="TRANSIENT" }
解决办法:
修改 JVM Heap 大小,参考 Setting JVM options 笔记。
#3 java.lang.OutOfMemoryError: Java heap space
-「Setting the heap size」
-「Elasticsearch service failing」
问题描述:
服务挂了,看日志,而java.lang.OutOfMemoryError: Java heap space是最后一条日志。
问题原因:
内部太少了。
解决方案:
系统为CentOS 7.5,Elasticsearch 6.3.2,修改/etc/sysconfig/elasticsearch文件中的ES_JAVA_OPTS="-Xms6000m -Xmx6000m",然后重启服务。
#2 cluster_block_exception blocked by: [FORBIDDEN/12/index read-only / allow delete (api)]
问题描述:
执行操作时,产生如下错误:
{ "error": { "root_cause": [ { "type": "cluster_block_exception", "reason": "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];" } ], "type": "cluster_block_exception", "reason": "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];" }, "status": 403 }
问题原因:
当Elasticsearch认为磁盘空间不足时会发生这种情况,因此它会将自身置于只读模式。
解决办法:
PUT /_all/_settings { "index.blocks.read_only_allow_delete": null }
#1 Result window is too large...
问题描述:
... "reason": { "type": "query_phase_execution_exception", "reason": "Result window is too large, from + size must be less than or equal to: [1000] but was [13100]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting." } ...
问题原因:
使用了Easticsearch中的「From / Size」方式进行数据分页会导致这个问题。官方文档有说”Note that from + size can not be more than the index.max_result_window index setting which defaults to 10,000“。如果你一定要使用这种分页方式,那么需要修改index.max_result_window的值。
解决办法:
PUT /<your index name>/_settings { "index": { "max_result_window": "100000000" } }
官方说明:
Elasticsearch Reference [6.5] » Search APIs » Request Body Search » From / Size
相关文章
Elasticsearch "Yellow" cluster status explained
相关文章
「Elasticsearch」- 分词过滤器
「Elasticsearch」- 安装中文分析器
「Elasticsearch」- 索引
「Curator」- 删除五天前日志索引
「Elasticsearch」- 杂记