AWS OpenSearch(ES)启用慢速日志

问题

最近有个搜索请求超过了29秒,想要排查一下这个问题。

思路

启用ES(AWS OpenSearch)搜索慢速日志,看看到底发生了什么问题。

控制台启用慢速日志组

设置慢速日志阀值

bash 复制代码
# 查看搜索请求慢速日志阈值
GET _cluster/settings?flat_settings

# 设置搜索请求慢速日志阈值
PUT /_cluster/settings
{
  "transient": {
    "cluster.search.request.slowlog.threshold.warn": "5s",
    "cluster.search.request.slowlog.threshold.info": "2s"
  }
}

# 查询索引搜索请求慢速日志阀值
GET 索引前缀*/_settings?pretty

# 设置分片慢速日志阈值
PUT 索引前缀*/_settings
{
  "index.search.slowlog.threshold.query.warn": "5s",
  "index.search.slowlog.threshold.query.info": "2s"
}

如果觉得这两个日志影响集群性能,可以设置会原来默认值-1即可。

参考

相关推荐
Dxy12393102166 小时前
别再让 ES 把你拖垮!5 个实战技巧让搜索性能提升 10 倍
大数据·elasticsearch·搜索引擎
星辰_mya11 小时前
Elasticsearch线上问题之OOM
大数据·elasticsearch·搜索引擎
Elastic 中国社区官方博客11 小时前
使用 Groq 与 Elasticsearch 进行智能查询
大数据·数据库·人工智能·elasticsearch·搜索引擎·ai·全文检索
张彦峰ZYF11 小时前
一套「策略化 Elasticsearch 召回平台」架构设计思路
大数据·elasticsearch·搜索引擎
Dxy12393102161 天前
Elasticsearch 索引与映射:为你的数据打造一个“智能仓库”
大数据·elasticsearch·搜索引擎
倒流时光三十年1 天前
SpringBoot 数据库同步 Elasticsearch 性能优化
数据库·spring boot·elasticsearch
星辰_mya1 天前
Elasticsearch更新了分词器之后
大数据·elasticsearch·搜索引擎
Elastic 中国社区官方博客1 天前
Elasticsearch:Workflows 介绍 - 9.3
大数据·数据库·人工智能·elasticsearch·ai·全文检索
星辰_mya1 天前
Elasticsearch主分片数写入后不能改
大数据·elasticsearch·搜索引擎
fendouweiqian1 天前
AWS WAF(配合 CloudFront)基础防护配置:免费能做什么、要不要开日志、如何限制危险方法
网络安全·aws·cloudfront