Database Autonomy Service (DAS) lets you monitor live session activity, terminate problem sessions, and run built-in diagnostics—all from a single Session Management view.
Prerequisites
Before you begin, make sure that:
Your database instance is connected to DAS
The instance access status is Normal Access
Permissions by action:
| Action | Required credential |
|---|---|
| View sessions and statistics | DAS console access |
| Terminate a session | Account and password of the database where the session was created, or a privileged account with permission to terminate sessions created by other accounts |
The User column on the Session Management tab shows which database account created each session. Check this column to identify the correct credential before terminating a session.
Known issue: RDS MySQL 8.0 deadlock risk
For RDS MySQL 8.0 instances with minor engine versions earlier than 20230610, concurrent execution of COM_STATISTICS, COM_CHANGE_USER, and SHOW PROCESSLIST may cause deadlocks and connection failures. Update to the latest minor engine version before using session management on these instances.
View and manage sessions
This procedure uses an ApsaraDB RDS for MySQL instance as an example.
Log on to the DAS console.
In the left-side navigation pane, choose Intelligent O&M Center > Instance Monitoring.
Find the instance and click its ID. The instance details page opens.
In the left-side pane, click Instance Sessions.
On the Session Management tab, use the Instance Sessions and Session Statistics sections to monitor and act on session data.
What each section shows
| Section | What you can do |
|---|---|
| Instance Sessions | View real-time data: exceptional sessions, active sessions, longest execution duration, CPU utilization, and connection usage. Export active sessions. Terminate sessions. Run diagnostic tools: 10-second SQL analysis, SQL throttling, and SQL optimization. |
| Session Statistics | View summary totals (total sessions, ongoing sessions, longest session duration) and a breakdown by user, access source, or database. Export any of these views. |
Run diagnostics on active sessions
When you spot anomalies in Instance Sessions, use the built-in tools in this order:
Identify the problem — Click 10s SQL Analysis in the upper-right corner of the Instance Sessions section. Review the summary, slow query logs, and SQL overview to pinpoint queries causing high load. For details, see 10-second SQL analysis.
Limit impact while you investigate — Click SQL Throttling. Configure threshold-based throttling rules to cap the rate of problem queries without terminating them. For details, see SQL throttling.
Fix the root cause — Click Optimize to get SQL optimization recommendations for the sessions identified as problematic. For details, see SQL optimization.
Terminate a session
Select the session and confirm with the account and password of the database where the session was created. Alternatively, use a privileged account with permission to terminate sessions from other accounts.
To review past terminations, click End Session History.