Configuring Auto Flow Control
Auto flow control allows you to kill all sessions, kill specific sessions by criteria, and view history.
To kill the current session or manually kill a session, see Managing Real-Time Sessions.
Functions
- Killing all sessions: After you enable Auto Kill Sessions and click Kill All Sessions, all sessions are automatically deleted.
- Killing specific sessions by criteria: You can add a task for killing sessions. Sessions that meet the criteria will be killed.
- Viewing history: You can view killed sessions.
Killing Specific Sessions by Criteria
- Log in to the management console.
- Click in the upper left corner and select a region and project.
- Click in the upper left corner of the page and choose Databases > GaussDB(for MySQL).
- On the Instances page, click the instance name.
- In the navigation pane, choose DBA Assistant > Historical Diagnosis.
- Click SQL Explorer and then Auto Flow Control.
- Click on the right of Auto Kill Sessions. In the displayed dialog box, click OK.
Figure 1 Enabling Auto Kill Sessions
- Click Add Kill Task.
Figure 2 Adding a task for killing sessions
- In the displayed dialog box, set the criteria for killing sessions.
Figure 3 Setting the criteria for killing sessions
- The parameters listed in Table 1 are in a logical AND relationship.
- If you only specify Session Duration (s) and Task Duration (s), all sessions that meet the criteria will be killed.
- A maximum of five conditional kill tasks can be executed at the same time.
Table 1 Parameter description Parameter
Description
User
Enter a single value, for example, root.
Host IP Address
Enter a single value, for example, 168.192.0.0.
Database Name
Enter a database name.
Command
Enter a command.
SQL Statement
Enter an SQL statement.
Session Duration (s)
The value ranges from 1 to 2147483647.
Task Closure Method
If you select Scheduled, you need to set Task Duration. After the duration ends, the task is automatically closed.
If you select Manual, you can click Stop in the Operation column of the task list to manually close a task.
Task Duration (s)
The value ranges from 10 to 31535999.
- Click OK.
When the criteria for killing sessions are met, the system automatically kills the sessions.
Killing All Sessions
- On the Instances page, click the instance name.
- In the navigation pane, choose DBA Assistant > Historical Diagnosis.
- Click SQL Explorer and then Auto Flow Control.
- Click on the right of Auto Kill Sessions. In the displayed dialog box, click OK.
Figure 4 Auto Kill Sessions
- Click Kill All Sessions.
Figure 5 Killing all sessions
- In the displayed dialog box, click OK.
Viewing History
- On the Instances page, click the instance name.
- In the navigation pane, choose DBA Assistant > Historical Diagnosis.
- Click SQL Explorer and then Auto Flow Control.
- Click on the right of Auto Kill Sessions. In the displayed dialog box, click OK.
Figure 6 Auto Kill Sessions
- Click View History.
Figure 7 Viewing killed sessions
- In the displayed dialog box, select a time range to view killed sessions within that period.
Figure 8 Viewing killed sessions
A maximum of 500 session records can be displayed.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot