Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: tidb kill线程没有用
[TiDB Usage Environment] Production Environment
[TiDB Version] v6.5.1
[Reproduction Path] Unable to kill thread
[Encountered Problem: Phenomenon and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachment: Screenshot/Log/Monitoring]
You can execute this statistical analysis during the database idle time:
SET GLOBAL tidb_auto_analyze_start_time=‘22:00 +0800’;
SET GLOBAL tidb_auto_analyze_end_time=‘08:00 +0800’;
Now I want to kill a thread, how do I kill it? Will this cause the database to hang?
You can schedule this statistical analysis to run during the database’s idle time
SET GLOBAL tidb_auto_analyze_start_time=‘23:00 +0800’;
SET GLOBAL tidb_auto_analyze_end_time=‘00:00 +0800’;
This way, the service will not run the analysis service now.
If there are multiple TiDB nodes, you can just restart the corresponding TiDB node.
How about trying to execute a kill command on the corresponding TiDB node?
set global tidb_auto_analyze_end_time =‘01:00 +0000’; Takes effect immediately.
set global tidb_max_auto_analyze_time =18600; Takes effect immediately, and any tasks that exceed this time limit started before this setting will also be killed.
You can’t just restart it either, it’s a production environment.
No need to restart, just set the statistics analysis time. By default, it runs all day, but you can set it to run during idle times. Note that this statement is used to optimize the database.
Just go to that node and kill it.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.