Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Process that was killed still on my processlist

Tags:

mysql

The thread that I killed is still on my thread list How do I eliminate it?

+-----+------+-----------+-------------+---------+-------+-----------+------------------------------------------------------------------------------------------------------+
| Id  | User | Host      | db          | Command | Time  | State     | Info                                                                                                 |
+-----+------+-----------+-------------+---------+-------+-----------+------------------------------------------------------------------------------------------------------+
| 678 | root | localhost | hthtthv     | Killed  | 36923 | query end | INSERT INTO `gtgttg` VALUES (1,'tgtg'),(2,'Shopping'),(4,'tgtgtg'),(          |
| 695 | root | localhost | NULL        | Query   |     0 | NULL      | show processlist                                                                                     |
+-----+------+-----------+-------------+---------+-------+-----------+------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
like image 579
cool_cs Avatar asked Jun 04 '12 15:06

cool_cs


People also ask

What does show Processlist mean?

SHOW [FULL] PROCESSLIST. The MySQL process list indicates the operations currently being performed by the set of threads executing within the server. The SHOW PROCESSLIST statement is one source of process information. For a comparison of this statement with other sources, see Sources of Process Information.

How kill all Processlist MySQL?

mysql> SELECT GROUP_CONCAT(CONCAT('KILL ',id,';') SEPARATOR ' ') FROM information_schema. processlist WHERE user <> 'system user'; This will kill all your MySQL queries.

How do I find out which processes are running SSH MySQL?

Show MySQL Processes in SSHLogin to SSH. Type in MYSQL to get into the mysql command line. Type show processlist; in order to see current processes on the server.

How do I stop a process from running in MySQL?

MySQL does not have a unique command for killing all processes. To kill all processes for a specific user, use CONCAT to create a file with the list of threads and statements. In our case, we entered root as the user. To specify another user, replace root with the desired username.


2 Answers

It needs to revert the actions it did, so this can take a long time. If it is an INNODB database, you can for instance look at this question: https://dba.stackexchange.com/questions/5654/internal-reason-for-killing-process-taking-up-long-time-in-mysql

So in the end: you need to wait for it to be eliminated

like image 57
Nanne Avatar answered Nov 15 '22 19:11

Nanne


In my case, my /var partition was full, where the MySQL binlogs are written. Once I freed some disk space, the killed connections immediately went away.

like image 34
Benedikt Köppel Avatar answered Nov 15 '22 18:11

Benedikt Köppel