gpt4 book ai didi

mongodb-atlas - mongodb atlas alert的调试流程

转载 作者:行者123 更新时间:2023-12-04 15:46:50 25 4
gpt4 key购买 nike

我对 mongodb 和 atlas 还很陌生,对以下警报感到困惑
Query Targeting: Scanned Objects / Returned has gone above 1000
我希望有更多数据可以帮助调试,例如查询或至少是集合。查询并不慢,因为性能顾问没有发现任何东西。

警报中给出的唯一信息是
- 创建时间
- 副本集
- 碎片链接
- 分片的类型(主要/次要)

我应该如何调试所谓的警报问题?

最佳答案

future 的警报包含有关如何解决问题的信息 - 简而言之,就是下载 mongodb 日志并搜索效率低下的查询。

To download the logs

1. Navigate to the Cluster page

If you do not see the cluster you want on the page, ensure you have selected the > proper Project

2. Select the cluster

a. Click the ellipsis icon (...) next to the cluster containing the mongod instance whose logs you want to download.
b. Select Download Logs.

3. In the Download Logs modal, edit the following fields

Select process: Select the process for which you want logs. Valid options are mongod and mongod-audit-log.
Select server: Select the server in the cluster whose logs you want to retrieve.
Start Time: Specify the date and time in your group’s time zone defining the inclusive lower bound of log activity to return. The start time must be less than 30 days ago.
End Time: Specify the date and time in your group’s time zone defining the inclusive upper bound of log activity to return.

4. Click Download Logs



一个低效的查询 is explained here

The following mongod log entry shows statistics generated from an inefficient query:

planSummary: COLLSCAN keysExamined:0
docsExamined: 10000 cursorExhausted:1 numYields:234
nreturned:4 protocol:op_query 358ms<Timestamp> COMMAND <query>

This query scanned 10,000 documents and returned only 4 for a ratio of 2500, which is highly inefficient.

关于mongodb-atlas - mongodb atlas alert的调试流程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55399335/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com