2014-12-01 257 views
0

我写了一个Cron作业来杀死已经睡了太久的进程。但是,当我杀死一个进程时,它立即重新生成。什么是重新启动这些进程?它是一个MySQL设置?MySQL KILL - 进程立即重新生成

这里是我使用的代码:

db.driver.execQuery 'select * from information_schema.processlist where time > 2000', (err, threads) -> 
    if err? then return 
    if !threads? then return 
    for thread in threads 
    do (thread) -> 
     db.driver.execQuery 'kill ' + thread.ID, (err, response) -> 
     console.log 'Killed thread that was ' + thread.TIME + ' seconds old' 
+0

可以是无数的东西,像一个监视器进程..试图识别用户 – Gadonski 2014-12-01 16:33:20

回答

1

MySQL不重试查询,它必须是正在运行它的应用程序 - 应用程序检测丧生查询作为服务器错误,绝立即重试它