「Elasticsearch」- 常见错误列表 @20210301

#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)]

-「Elasticsearch error: cluster_block_exception [FORBIDDEN/12/index read-only / allow delete (api)], flood stage disk watermark exceeded

问题描述:
执行操作时,产生如下错误:

{
	"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」- 安装(Debian 8.2 and Elasticsearch 6.5.0)
「Elasticsearch」- 修改日志配置
「Curator」- 删除五天前日志索引
「Elasticsearch」- 使用 Curator 管理索引(学习笔记)

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值