{"action":"created","issue":{"url":"https://api.github.com/repos/Unitech/pm2/issues/1179","repository_url":"https://api.github.com/repos/Unitech/pm2","labels_url":"https://api.github.com/repos/Unitech/pm2/issues/1179/labels{/name}","comments_url":"https://api.github.com/repos/Unitech/pm2/issues/1179/comments","events_url":"https://api.github.com/repos/Unitech/pm2/issues/1179/events","html_url":"https://github.com/Unitech/pm2/issues/1179","id":68888751,"node_id":"MDU6SXNzdWU2ODg4ODc1MQ==","number":1179,"title":"PM2 reload cause cpu 100%","user":{"login":"hefangshi","id":613846,"node_id":"MDQ6VXNlcjYxMzg0Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/613846?v=4","gravatar_id":"","url":"https://api.github.com/users/hefangshi","html_url":"https://github.com/hefangshi","followers_url":"https://api.github.com/users/hefangshi/followers","following_url":"https://api.github.com/users/hefangshi/following{/other_user}","gists_url":"https://api.github.com/users/hefangshi/gists{/gist_id}","starred_url":"https://api.github.com/users/hefangshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hefangshi/subscriptions","organizations_url":"https://api.github.com/users/hefangshi/orgs","repos_url":"https://api.github.com/users/hefangshi/repos","events_url":"https://api.github.com/users/hefangshi/events{/privacy}","received_events_url":"https://api.github.com/users/hefangshi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2015-04-16T09:57:03Z","updated_at":"2018-10-03T13:00:50Z","closed_at":"2018-10-03T13:00:50Z","author_association":"NONE","body":"When i use pm2 reload to reload my app, i got cpu 100%\n\n```\npm2 0.12.7\nnode v0.12.0\n```\n\nand when i wanna to check it with top or ps, i got this\n\n```\n-bash:fork:Resource temporarily unavailable\n```\n\nhere is the pm2.log\n\n```\n2015-04-16 17:18:33: Starting execution sequence in -cluster mode- for app name:yog id:0\n2015-04-16 17:18:33: App name:yog id:0 online\n2015-04-16 17:18:36: -reload- New worker listening\n2015-04-16 17:18:36: -reload- Old worker disconnected\n2015-04-16 17:18:36: Process with pid 10083 killed\n2015-04-16 17:18:36: -reload- Creating a new process waiting for connections\n2015-04-16 17:18:36: Starting execution sequence in -cluster mode- for app name:yog id:1\n2015-04-16 17:18:36: App name:yog id:1 online\n2015-04-16 17:18:37: -reload- New worker listening\n2015-04-16 17:18:37: -reload- Old worker disconnected\n2015-04-16 17:18:37: Process with pid 11379 killed\n2015-04-16 17:18:37: -reload- Creating a new process waiting for connections\n2015-04-16 17:18:37: Starting execution sequence in -cluster mode- for app name:yog id:2\n2015-04-16 17:18:37: App name:yog id:2 online\n2015-04-16 17:18:39: -reload- New worker listening\n2015-04-16 17:18:39: -reload- Old worker disconnected\n2015-04-16 17:18:39: Process with pid 12587 killed\n2015-04-16 17:18:39: -reload- Creating a new process waiting for connections\n2015-04-16 17:18:39: Starting execution sequence in -cluster mode- for app name:yog id:3\n2015-04-16 17:18:39: App name:yog id:3 online\n2015-04-16 17:18:41: -reload- New worker listening\n2015-04-16 17:18:41: -reload- Old worker disconnected\n2015-04-16 17:18:41: Process with pid 14088 killed\n2015-04-16 17:18:41: -reload- Creating a new process waiting for connections\n2015-04-16 17:18:41: Starting execution sequence in -cluster mode- for app name:yog id:4\n2015-04-16 17:18:41: App name:yog id:4 online\n2015-04-16 17:18:42: -reload- New worker listening\n2015-04-16 17:18:42: -reload- Old worker disconnected\n2015-04-16 17:18:42: Process with pid 15434 killed\n2015-04-16 17:18:42: -reload- Creating a new process waiting for connections\n2015-04-16 17:18:42: Starting execution sequence in -cluster mode- for app name:yog id:5\n2015-04-16 17:18:42: App name:yog id:5 online\n2015-04-16 17:18:44: -reload- New worker listening\n2015-04-16 17:18:44: -reload- Old worker disconnected\n2015-04-16 17:18:44: Process with pid 16713 killed\n2015-04-16 17:18:44: -reload- Creating a new process waiting for connections\n2015-04-16 17:18:44: Starting execution sequence in -cluster mode- for app name:yog id:6\n2015-04-16 17:18:44: App name:yog id:6 online\n2015-04-16 17:18:46: -reload- New worker listening\n2015-04-16 17:18:46: -reload- Old worker disconnected\n2015-04-16 17:18:46: Process with pid 17840 killed\n2015-04-16 17:18:46: -reload- Creating a new process waiting for connections\n2015-04-16 17:18:46: Starting execution sequence in -cluster mode- for app name:yog id:7\n2015-04-16 17:18:46: App name:yog id:7 online\n2015-04-16 17:18:47: -reload- New worker listening\n2015-04-16 17:18:47: -reload- Old worker disconnected\n2015-04-16 17:18:47: Process with pid 19176 killed\n2015-04-16 17:18:47: -reload- Creating a new process waiting for connections\n2015-04-16 17:18:47: Starting execution sequence in -cluster mode- for app name:yog id:8\n2015-04-16 17:18:47: App name:yog id:8 online\n2015-04-16 17:18:49: -reload- New worker listening\n2015-04-16 17:18:49: -reload- Old worker disconnected\n2015-04-16 17:18:49: ERROR CAUGHT BY DOMAIN:\nError: The process does not have permission to send the signal to any receiving process.\n    at killPid (/home/fis/nhost/node_runtime/lib/node_modules/pm2/lib/TreeKill.js:50:13)\n    at /home/fis/nhost/node_runtime/lib/node_modules/pm2/lib/TreeKill.js:35:7\n    at Array.forEach (native)\n    at killAll (/home/fis/nhost/node_runtime/lib/node_modules/pm2/lib/TreeKill.js:27:21)\n    at /home/fis/nhost/node_runtime/lib/node_modules/pm2/lib/TreeKill.js:20:7\n    at isFinish (/home/fis/nhost/node_runtime/lib/node_modules/pm2/lib/TreeKill.js:65:14)\n    at /home/fis/nhost/node_runtime/lib/node_modules/pm2/lib/TreeKill.js:80:16\n    at ChildProcess.exithandler (child_process.js:751:5)\n    at ChildProcess.emit (events.js:110:17)\n    at maybeClose (child_process.js:1008:16)\n2015-04-16 17:18:49: ERROR CAUGHT BY DOMAIN:\nError: spawn pm2 ENOENT\n    at exports._errnoException (util.js:746:11)\n    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)\n    at child_process.js:1137:20\n    at Immediate._tickDomainCallback [as _onImmediate] (node.js:381:11)\n    at processImmediate [as _immediateCallback] (timers.js:358:17)\n2015-04-16 17:18:49: ERROR CAUGHT BY DOMAIN:\nError: spawn pm2 ENOENT\n    at exports._errnoException (util.js:746:11)\n    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)\n    at child_process.js:1137:20\n    at Immediate._tickDomainCallback [as _onImmediate] (node.js:381:11)\n    at processImmediate [as _immediateCallback] (timers.js:358:17)\n2015-04-16 17:18:49: ERROR CAUGHT BY DOMAIN:\nError: spawn pm2 ENOENT\n    at exports._errnoException (util.js:746:11)\n    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)\n    at child_process.js:1137:20\n    at Immediate._tickDomainCallback [as _onImmediate] (node.js:381:11)\n    at processImmediate [as _immediateCallback] (timers.js:358:17)\n2015-04-16 17:18:49: ERROR CAUGHT BY DOMAIN:\nError: spawn pm2 ENOENT\n    at exports._errnoException (util.js:746:11)\n    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)\n    at child_process.js:1137:20\n    at Immediate._tickDomainCallback [as _onImmediate] (node.js:381:11)\n    at processImmediate [as _immediateCallback] (timers.js:358:17)\n2015-04-16 17:18:49: ERROR CAUGHT BY DOMAIN:\nError: spawn pm2 ENOENT\n    at exports._errnoException (util.js:746:11)\n    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)\n    at child_process.js:1137:20\n    at Immediate._tickDomainCallback [as _onImmediate] (node.js:381:11)\n    at processImmediate [as _immediateCallback] (timers.js:358:17)\n```\n\nand `ERROR CAUGHT BY DOMAIN` is repeat over and over\n\nwhat's more, i found there is a log of defunct process for PM2:God\n\nwhen i killed the pm2 daemon and restart it, everything is fine.\n\n```\n2015-04-16 17:24:18: [PM2][WORKER] Started with refreshing interval: 30000\n2015-04-16 17:24:18: [[[[ PM2/God daemon launched ]]]]\n2015-04-16 17:24:18: BUS system [READY] on port /home/fis/nhost/pm2/pub.sock\n2015-04-16 17:24:18: RPC interface [READY] on port /home/fis/nhost/pm2/rpc.sock\n2015-04-16 17:24:18: PM2 is being killed via kill method\n2015-04-16 17:24:18: RPC socket closed\n2015-04-16 17:24:18: PUB socket closed\n2015-04-16 17:24:19: [PM2][WORKER] Started with refreshing interval: 30000\n2015-04-16 17:24:19: [[[[ PM2/God daemon launched ]]]]\n2015-04-16 17:24:19: BUS system [READY] on port /home/fis/nhost/pm2/pub.sock\n2015-04-16 17:24:19: RPC interface [READY] on port /home/fis/nhost/pm2/rpc.sock\n2015-04-16 17:24:19: Starting execution sequence in -cluster mode- for app name:yog id:0\n2015-04-16 17:24:19: App name:yog id:0 online\n2015-04-16 17:24:19: Starting execution sequence in -cluster mode- for app name:yog id:1\n2015-04-16 17:24:19: App name:yog id:1 online\n2015-04-16 17:24:19: Starting execution sequence in -cluster mode- for app name:yog id:2\n2015-04-16 17:24:19: App name:yog id:2 online\n2015-04-16 17:24:19: Starting execution sequence in -cluster mode- for app name:yog id:3\n2015-04-16 17:24:19: App name:yog id:3 online\n2015-04-16 17:24:19: Starting execution sequence in -cluster mode- for app name:yog id:4\n2015-04-16 17:24:19: App name:yog id:4 online\n2015-04-16 17:24:19: Starting execution sequence in -cluster mode- for app name:yog id:5\n2015-04-16 17:24:19: App name:yog id:5 online\n2015-04-16 17:24:19: Starting execution sequence in -cluster mode- for app name:yog id:6\n2015-04-16 17:24:19: App name:yog id:6 online\n2015-04-16 17:24:19: Starting execution sequence in -cluster mode- for app name:yog id:7\n2015-04-16 17:24:19: App name:yog id:7 online\n2015-04-16 17:24:19: Starting execution sequence in -cluster mode- for app name:yog id:8\n2015-04-16 17:24:19: App name:yog id:8 online\n2015-04-16 17:24:19: Starting execution sequence in -cluster mode- for app name:yog id:9\n2015-04-16 17:24:19: App name:yog id:9 online\n2015-04-16 17:24:19: Starting execution sequence in -cluster mode- for app name:yog id:10\n2015-04-16 17:24:19: App name:yog id:10 online\n2015-04-16 17:24:19: Starting execution sequence in -cluster mode- for app name:yog id:11\n2015-04-16 17:24:19: App name:yog id:11 online\n```\n"},"comment":{"url":"https://api.github.com/repos/Unitech/pm2/issues/comments/426628720","html_url":"https://github.com/Unitech/pm2/issues/1179#issuecomment-426628720","issue_url":"https://api.github.com/repos/Unitech/pm2/issues/1179","id":426628720,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjYyODcyMA==","user":{"login":"Unitech","id":757747,"node_id":"MDQ6VXNlcjc1Nzc0Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/757747?v=4","gravatar_id":"","url":"https://api.github.com/users/Unitech","html_url":"https://github.com/Unitech","followers_url":"https://api.github.com/users/Unitech/followers","following_url":"https://api.github.com/users/Unitech/following{/other_user}","gists_url":"https://api.github.com/users/Unitech/gists{/gist_id}","starred_url":"https://api.github.com/users/Unitech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unitech/subscriptions","organizations_url":"https://api.github.com/users/Unitech/orgs","repos_url":"https://api.github.com/users/Unitech/repos","events_url":"https://api.github.com/users/Unitech/events{/privacy}","received_events_url":"https://api.github.com/users/Unitech/received_events","type":"User","site_admin":false},"created_at":"2018-10-03T13:00:50Z","updated_at":"2018-10-03T13:00:50Z","author_association":"OWNER","body":"Fixed via PM2 (3.2.0):\r\n\r\n```bash\r\n$ npm install pm2 -g\r\n$ pm2 update\r\n```\r\n\r\nBlog post: https://blog.pm2.io/pm2-runtime-3-2-autumn-features/\r\nChangelog: https://github.com/Unitech/pm2/releases/tag/3.2.0"}}
{"actor":{"display_login":"Unitech"}}