Self-Service Troubleshooting for Common Performance Problems

Last updated: 2020-11-12 15:01:43

    TencentDB for MongoDB provides a self-service troubleshooting solution in the console to help you quickly and easily troubleshoot common MongoDB performance problems.

    Increased Slow Queries

    Problem description

    Slow query is the most common performance problem of MongoDB. You can use the slow query management and slow log query features in the console for troubleshooting.

    Solution

    Log in to the TencentDB for MongoDB Console and click an instance name to enter the instance management page.

    • Method 1: select Manage database > Slow Query Management and the list will display the requests being executed by the current instance (including requests of slave nodes). You can click Batch Kill to kill slow query statements.
    • Method 2: select the Slow Log Query tab to view and analyze slow logs. The system logs operations executed for more than 100 milliseconds and retains slow logs for 7 days. Currently, slow logs cannot be exported. If needed, please contact the aftersales service or submit a ticket for assistance.
      If slow queries are heaping too fast, you are recommended to optimize your business based on the slow query analysis result. If the problem persists, please contact the aftersales service or submit a ticket for assistance.

    Number of Connections Exceeding Limit

    Problem description

    If the number of connections exceeds the upper limit, you can use the connections management and restart features in the console and optimize the service for troubleshooting.

    Solution

    Method 1. Increase the upper limit

    1. Log in to the TencentDB for MongoDB Console and click an instance name to enter the instance management page.
    2. Select Manage Database > Manage Connection and view the source IPs and number of connections for service troubleshooting.

      Note:

      • If the number of connections reaches or exceeds 80% of the upper limit and affects the establishment of new connections, you can click Increase Connections in the console to increase the maximum number of connections to 150% of the original limit for the next 6 hours.
      • If the problem persists, please contact the aftersales service or submit a ticket for assistance.

    Method 2. Restart the instance

    1. Log in to the TencentDB for MongoDB Console and click an instance name to enter the instance management page.
    2. Select Manage Database > Manage Connection. You can click Restart on the right to restart the mongos instance to fix the problem.

      Note:

      • Replica sets on v4.0 do not have mongos instances.
      • Restarting the mongod instance is highly risky and will cause a momentary disconnection, during which if data is written, rollback may be triggered, leading to data loss. Therefore, the restart feature is not enabled by default. If you need to enable it, please contact the aftersales service or submit a ticket for assistance.

    Method 3. Optimize the service

    You can troubleshoot the service for optimization.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help