All Products
Search
Document Center

Database Autonomy Service:Instance sessions

Last Updated:Jan 22, 2026

If a database has performance issues or abnormal operations, you can use its session information to quickly identify and resolve the issues. The instance session feature of Database Autonomy Service (DAS) lets you view real-time session information for a target instance. It also provides operations, such as ending and exporting current sessions.

Prerequisites

The target database instance is connected to DAS, and its Accessed State is Normal Access.

Limits

To monitor the performance of an ApsaraDB for MongoDB standalone instance, you must grant the required permissions to the database account of the instance. To do so, perform the following steps:

  1. Create an account in the ApsaraDB for MongoDB instance and grant permissions to the account.

    1. Connect to the ApsaraDB for MongoDB instance. For more information, see Connect to an ApsaraDB for MongoDB instance.

    2. Run the following commands to create an account for the admin database and grant permissions to the account:

      use admin;
      db.createUser({user:'das_test',pwd:'password',roles:[{role:'readAnyDatabase', db:'admin'}, {role:'clusterMonitor', db:'admin'}, {role: 'hostManager', db: 'admin'},{db: 'local', role: 'dbAdmin'},{db: 'config', role: 'dbAdmin'},{db: 'admin', role: 'dbAdminAnyDatabase'}]});
      Note

      In this example, the username das_test and the password password are used. Replace the username and password based on your business requirements.

  2. Authorize the account in DAS.

    1. Log on to the DAS console.

    2. In the navigation pane on the left, click Intelligent O&M Center > Instance Monitoring .

    3. On the Instance Monitoring page, find the database instance that you want to monitor and choose Actions > Authorization in the Actions column.

      image

    4. In the Authorization dialog box, configure the Database Account and Password parameters and click Authorize.

    5. After the Access Status column displays Connected, click OK.

Procedure

  1. Log on to the DAS console.

  2. In the navigation pane on the left, click Intelligent O&M Center > Instance Monitoring .

  3. Find the target instance and click the instance ID to open the instance details page.

  4. In the left-side pane, click Instance Sessions.

  5. On the Instance Sessions page, perform the following operations on the current instance sessions in the Instance Sessions, Session Statistics, and Connections sections:

    • Throttle sessions: Set concurrency limits for find, insert, update, and delete operations on a specified collection. For more information, see MongoDB session throttling.

    • End sessions: Select the target sessions and click the Kill Selected button.

    • View session statistics: View a session overview that includes the total number of sessions, active sessions, longest execution time, sessions with a duration longer than 3 seconds, and queries that do not use an index. You can also view the total and active session counts grouped by client or namespace.

    • Export session statistics: Export session statistics grouped by summary, client, or namespace.

    • View connection statistics: View the total number of connections and active connections.