Managing Real-Time Sessions
Scenarios
You can query session snapshots of your instance while sorting, filtering, and displaying the snapshots as needed. You can filter and identify the desired slow SQL sessions and active sessions by user, host, and database. Sessions can be killed for urgent instance recovery to ensure database availability.
Precautions
Killing a session may cause service disconnection. Your applications should be able to reconnect to the instance.
Procedure
- Click
in the upper left corner and select a region.
- Click
in the upper left corner of the page and choose Databases > Relational Database Service.
- On the Instances page, click the DB instance name.
- In the navigation pane, choose DBA Assistant > Real-Time Diagnosis.
- Click the Sessions tab. You can perform the following operations on this tab page:
- Viewing session statistics
In the sessions statistics, you can view statistics on the slow sessions, active sessions, total sessions, long transaction sessions by user, access host, and database.
Figure 1 Sessions - Setting a slow session threshold
- Killing abnormal sessions
In the session list, you can view session details. You can also select the abnormal session you want to end and click Kill Session to recover the database.
A maximum of 100 sessions can be killed at a time.
Figure 3 Killing a session - Configuring SQL throttling
In the session list, click SQL Throttling and set the SQL type and keyword to match SQL statements. When the number of matched SQL statements exceeds the configured upper limit, the DB instance will refuse to execute the SQL statements, thus ensuring the instance stability.
For details, see Creating a SQL Throttling Rule.
- Creating lock analysis
To create a lock analysis task, log in to the DB instance on the Locks & Transactions page first. For details, see Managing Locks & Transactions. Then, click Create Lock Analysis. A lock analysis record is generated, which is used to check whether there are any sessions that hold locks.
- Exporting the session list
- Viewing session statistics
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.
For any further questions, feel free to contact us through the chatbot.
Chatbot