Updated on 2025-11-26 GMT+08:00

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

  1. Log in to the management console.
  2. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  3. On the Instances page, click the target DB instance name to go to the Overview page.
  4. In the navigation pane, choose DBA Assistant > Real-Time Diagnosis.
  5. On the Sessions tab page, perform the following operations:

    • Viewing session statistics

      In the session statistics, you can view statistics on the slow sessions, active sessions, total sessions, long transaction sessions by user, access host, and database.

    • Setting a slow session threshold

      Click next to the Slow Session Threshold field. In the displayed dialog box, set a slow session threshold and click OK. Sessions whose execution durations are greater than this threshold are automatically displayed.

    • 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.