Updated on 2024-08-29 GMT+08:00

Real-Time Sessions

The real-time session function allows you to query session snapshots of your instance and can sort out and display only the required snapshots. You can quickly search for slow or active sessions in multiple dimensions like users, host IP addresses, and database names. DAS allows you to kill sessions to restore your instance, securing your database availability.

Procedure

  1. Log in to the DAS console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner, and under Databases, click Data Admin Service.
  4. In the navigation pane, choose Intelligent O&M > Instance List.

    Alternatively, on the Overview page, click Go to Intelligent O&M.

  5. In the upper right corner of the Instance List page, search for instances by engine type, instance name, or instance IP.

    Figure 1 Searching for instances

  6. Locate the box containing your target instance and click Details.
  7. On the Sessions tab page, perform the following operations:

    • View session statistics.
      You can view statistics on the number of slow sessions, number of active sessions, and total number of sessions by user, access host, or database.
      Figure 2 Real-time sessions
    • Set a slow session threshold.
      Click Set Slow Session Threshold. In the displayed dialog box, set Max. Execution Time for a Query (s) and click OK. Sessions whose execution time exceeds the threshold are automatically displayed in the session list.
      Figure 3 Setting a slow session threshold
    • Kill abnormal sessions if necessary.

      In the session list, you can view session details. You can also select the abnormal session you want to end based on session status and service requirements and click Kill Session to recover the database.