Instance sessions allow you to view the information about sessions between a KVStore for Redis instance and a client in real time, which includes the client information, commands that are run, and connection duration. You can also terminate abnormal sessions based on your business requirements.

Prerequisite

The instance is a standalone, replica set, or sharded cluster instance.

Procedure

  1. Log on to the ApsaraDB for MongoDB console.
  2. In the upper-left corner of the page, select the resource group and the region of the target instance.
  3. In the left-side navigation pane, click Replica Set Instances, or Sharded Cluster Instances based on the instance type.
  4. Find the target instance and click its ID.
  5. In the left-side navigation pane, choose CloudDBA > Sessions.
  6. In the Current Node drop-down list, select the node that you want to view.
    Instance sessions
    Note
    • If you turn on Auto Refresh, the system updates session data on the page every 5 seconds. By default, the system displays the active sessions. You can turn on the Display All switch to view both active and inactive sessions.
    • In the Session Statistics section, you can view information about sessions in the Overview, Statistics by Client, and Statistics by Namespace charts.

Terminate instance sessions

Warning To avoid unexpected results, we recommend that you do not terminate system-level sessions.
  1. In the Instance Sessions section, select the sessions that you want to terminate, and click Kill Selected.
    Terminate sessions
  2. In the Terminate Session message, click Kill.