Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ var csts = {

WORKER_INTERVAL : process.env.PM2_WORKER_INTERVAL || 30000,
KILL_TIMEOUT : process.env.PM2_KILL_TIMEOUT || 1600,
KILL_RETRY_TIME : process.env.PM2_KILL_RETRY_TIME || 100,
KILL_SIGNAL : process.env.PM2_KILL_SIGNAL || 'SIGINT',
KILL_USE_MESSAGE : process.env.PM2_KILL_USE_MESSAGE || false,

Expand Down
2 changes: 1 addition & 1 deletion lib/API/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
},
"kill_retry_time": {
"type": "number",
"default" : 100
"docDefault" : 100
},
"write": {
"type": "boolean"
Expand Down
5 changes: 3 additions & 2 deletions lib/God/Methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ module.exports = function(God) {

var timeout = null;
var kill_timeout = (pm2_env && pm2_env.kill_timeout) ? pm2_env.kill_timeout : cst.KILL_TIMEOUT;
var kill_retry_time = (pm2_env && pm2_env.kill_retry_time) ? pm2_env.kill_retry_time : cst.KILL_RETRY_TIME;
var mode = pm2_env.exec_mode;

var timer = setInterval(function() {
Expand All @@ -165,9 +166,9 @@ module.exports = function(God) {
clearInterval(timer);
return cb(null, true);
}
console.log('pid=%d msg=failed to kill - retrying in %dms', pid, pm2_env.kill_retry_time);
console.log('pid=%d msg=failed to kill - retrying in %dms', pid, kill_retry_time);
return false;
}, pm2_env.kill_retry_time);
}, kill_retry_time);

timeout = setTimeout(function() {
clearInterval(timer);
Expand Down