2014-12-01 69 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不重試查詢,它必須是正在運行它的應用程序 - 應用程序檢測喪生查詢作爲服務器錯誤,絕立即重試它