… can open another MySQL connection to kill the query which was running (otherwise query may well continue to run even if PHP script is aborted). UPDATE: There are some comments saying experimenting with sleep() function is wrong and if I would use real MySQL queries…
Comment: MySQL for Hosting Providers - how do they manage ?
…Query | 0 | NULL | show full processlist | | 282 | root | localhost | NULL | Query | 3 | init | select sleep(10) | +—–+——+———–+——+———+——+——-+———————–+ 2 rows in set (0.00 sec) mysql> kill… give newbies, shell access, PHP access, sometimes more, they…
Comment: Debugging sleeping connections with MySQL
… old sleeping connections. my.cnf: wait_timeout=180 # = 30min php cron script: #!/usr/bin/php -q 1000 && $row['Command'] == “Sleep“) && ($row['User'] != “Root”)) { $killed = 0; mysql_query(“kill “.$row['Id']) or ($killed = 1); if ($killed = 1) { echo “Killed process…

