Help Center/
Document Database Service/
User Guide/
Connection Management/
Querying DB Instance Connections and Managing Sessions
Updated on 2024-08-08 GMT+08:00
Querying DB Instance Connections and Managing Sessions
Scenario
- You can query the number of internal and external connections of a DB instance and the source IP addresses of these connections.
- You can also manage the sessions of an instance node and kill an abnormal session that takes a long time.
Precautions
- This function is not available to ECS-hosted instances and instances in the creating, frozen, or abnormal state.
- Exercise caution when killing a session. Your operations will be recorded in logs.
- This function is available for replica set instances and cluster instances of versions 3.4, 4.0, 4.2, and 4.4.
- When the CPU usage reaches the upper limit, requests to kill sessions may time out. In this case, you have to try more than once.
Querying the Number of Connections of a DB Instance
- Log in to the management console.
- Click in the upper left corner and select a region and a project.
- Click in the upper left corner of the page and choose Databases > Document Database Service.
- In the navigation pane on the left, choose Data Admin Service.
Figure 1 Data Admin Service
- In the navigation pane on the left, choose Intelligent O&M > Instance List, and select DDS DB Instances from the drop-down list in the upper right corner of the page.
Figure 2 Instance List
- Click Details in the area of the target instance.
- Click the Connections page to view the number of internal and external connections of the current DB instance and the source IP addresses of these connections.
Figure 3 Connections
- On the displayed page, click Change Node to view the number of internal and external connections of a specified node in the DB instance and the source IP addresses of these connections.
Managing Sessions
- Log in to the management console.
- Click in the upper left corner and select a region and a project.
- Click in the upper left corner of the page and choose Databases > Document Database Service.
- In the navigation pane on the left, choose Data Admin Service.
Figure 4 Data Admin Service
- In the navigation pane on the left, choose Intelligent O&M > Instance List, and select DDS DB Instances from the drop-down list in the upper right corner of the page.
Figure 5 Instance List
- Click the Sessions page to view the sessions of the current instance node.
Figure 6 Sessions
In the statistical item list, you can view total sessions, running sessions, and longest running session time of the current instance node. You can also view total sessions and active sessions by host or namespace. In the session list, you can view session details and perform the following operations:- Select the abnormal session you want to end and click Kill for your database to recover.
- Exercise caution when performing the kill operation. After you kill a session, you can switch to the History Logs tab to view the details.
- Specify Sessions lasting longer than and click the refresh button to search for the sessions who last longer than this threshold.
- Select the abnormal session you want to end and click Kill for your database to recover.
Parent topic: Connection Management
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot