killing a process?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
kkonline
Forum Contributor
Posts: 251
Joined: Thu Aug 16, 2007 12:54 am

killing a process?

Post by kkonline »

Hi,
suddenly there is a too many connections 1040 on my site to access phpmyadmin.

on doing a SHOW PROCESSLIST; from backend it seems that one of the process has misbehaved and it starting the connections; so how do i kill the processes


I get something like

Code: Select all

mysql> SHOW PROCESSLIST; 
+-------+------------+-----------+--------+---------+--------+--------------------------+------------------------------------------------------------------------------------------------------+
| Id    | User       | Host      | db     | Command | Time   | State                    | Info                                                                                                 |
+-------+------------+-----------+--------+---------+--------+--------------------------+------------------------------------------------------------------------------------------------------+
| 40396 | user1 | localhost | joomla | Query   | 730153 | Waiting to get writelock | REPAIR TABLE `jos_acajoom_lists`,`jos_acajoom_mailings`,`jos_acajoom_queue`,`jos_acajoom_stats_detai | 
| 40398 | user1 | localhost | joomla | Query   | 730152 | Waiting to get writelock | REPAIR TABLE `jos_acajoom_lists`,`jos_acajoom_mailings`,`jos_acajoom_queue`,`jos_acajoom_stats_detai | 
| 40399 | user1 | localhost | joomla | Query   | 730048 | Waiting for table        | REPAIR TABLE `jos_acajoom_lists`,`jos_acajoom_mailings`,`jos_acajoom_queue`,`jos_acajoom_stats_detai | 
| 40400 | user1 | localhost | joomla | Query   | 730048 | Waiting for table        | REPAIR TABLE `jos_acajoom_lists`,`jos_acaj

how to kill this process?
User avatar
novice4eva
Forum Contributor
Posts: 327
Joined: Thu Mar 29, 2007 3:48 am
Location: Nepal

Re: killing a process?

Post by novice4eva »

simple as :

Code: Select all

 
mysql> KILL 40396;
 

ie: KILL 'THREAD id';
Post Reply