This topic describes how to use the Database Autonomy Service (DAS) console to view the active sessions of MongoDB instances and terminate sessions.
The DAS console offers an intuitive display of the session details of each MongoDB instance. For example, you can view the active sessions, the queries where no indexes are used, and the sessions that last for more than 3 seconds. You can also view the client that initiates the largest number of active sessions. In addition, the DAS console allows you to terminate the selected sessions where errors occur.
- You remain logged on to the DAS console.
- The target MySQL database instance is connected to DAS, and the target database instance is in the Accessed state. For more information about the procedures, see Connect ApsaraDB for RDS database instances and Connect user-created database instances.
In the left-side navigation pane, click Instance Monitoring. On the page that appears, find the target database instance.
In the Actions column for the target instance, move the pointer over Performance. Then, select Instance Sessions from the Performance drop-down list.
On the Instance Sessions page, you can perform the following operations:
View the active sessions and all the connections.
Terminate one or more selected sessions.
The DAS console provides an overview of the session statistics, and shows the session statistics based on clients and namespaces. This provides a quick method for you to find the session details. For example, you can easily find the queries where no indexes are used and the sessions that last for more than 3 seconds. You can also find the client that initiates the largest number of active sessions.