reduce_search_phase_exception: reduce_search_phase_exception
Elasticsearch含义
搜索的 reduce 阶段发生错误。协调节点在合并(reduce)来自不同分片的部分结果/聚合时遇到问题,无法生成最终结果。
原因
通常是合并结果时超出内存/资源限制(例如非常大的聚合、circuit breaker 触发)、聚合结构不兼容/无效,或分片返回的部分结果无法合并。在基数非常高的聚合中很常见。
解决方法
阅读 caused_by 详情以确定根本原因。减轻繁重的聚合:降低高基数 terms 聚合的 size,用 composite 聚合分页,并减少不必要的子聚合。监控内存压力,必要时将查询拆分为更小的部分。如果 circuit breaker 触发,降低查询开销。
同一数据库的其他条目
- recovery_engine_exceptionrecovery_engine_exception
- snapshot_in_progress_exceptionsnapshot_in_progress_exception
- repository_verification_exceptionrepository_verification_exception
- aggregation_execution_exceptionaggregation_execution_exception
- failed_node_exceptionfailed_node_exception
- elasticsearch_parse_exceptionelasticsearch_parse_exception