The instance sessions feature lets you view real-time information about sessions between your ApsaraDB for MongoDB instance and its clients, including client details, executed commands, and connection duration. You can also terminate abnormal sessions.
Prerequisites
The instance is a replica set instance or a sharded cluster instance that uses the MongoDB protocol.
Procedure
-
On the Replica Set Instances or Sharded Cluster Instances page, select the resource group and region, then click the ID of the target instance.
-
In the navigation pane on the left, click .
-
On the Instance Sessions tab, select a node from the Current Node drop-down list.
Note-
Enable the Auto Refresh switch to refresh session information every 5 seconds. By default, only active sessions are displayed. To view all sessions, enable the Display All switch.
-
You can also view session details in the Session Statistics section on the Overview, Statistics by Client, and Statistics by Namespace tabs.
-
Terminate instance sessions
Do not terminate system-level sessions. Doing so can cause instance instability. Proceed with caution.
-
In the Instance Sessions section, select the sessions to terminate, and then click Kill Selected.
Hold down the Shift key to select multiple sessions. Inactive sessions cannot be terminated.
-
In the Terminate Session dialog box, click Kill.