-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1184 from Unitech/development
v0.12.11 release
- Loading branch information
Showing
51 changed files
with
1,039 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
|
||
# List open files | ||
|
||
``` | ||
$ lsof -i -n -P | grep pm2 | ||
``` | ||
|
||
Display limits | ||
|
||
``` | ||
$ ulimit -a | ||
``` | ||
|
||
# Memory leak | ||
|
||
``` | ||
require('webkit-devtools-agent').start({ | ||
port: 9999, | ||
bind_to: '0.0.0.0', | ||
ipc_port: 3333, | ||
verbose: true | ||
}); | ||
``` | ||
|
||
# Observe feature | ||
|
||
``` | ||
/////////////////////////////////////////////////////// | ||
// Temporary disabling this because tests don't pass // | ||
/////////////////////////////////////////////////////// | ||
var obs = new observe.ObjectObserver(God.clusters_db); | ||
obs.open(function() { | ||
God.dumpProcessList && God.dumpProcessList(function() { | ||
console.log('Process List Dumped'); | ||
}); | ||
}); | ||
if (!Object.observe) { | ||
setInterval(Platform.performMicrotaskCheckpoint, 1000); | ||
} | ||
``` | ||
|
||
# UncaughtException handling | ||
|
||
``` | ||
process.on('uncaughtException', function(err) { | ||
if (err && err.message == 'Resource leak detected.') { | ||
// Catch and ignore this error | ||
// Throw by cluster module with Node 0.11.13<= | ||
console.error(err.stack); | ||
console.error('Resource leak detected for cluster module'); | ||
} | ||
else if (err) { | ||
console.error(err.stack); | ||
if (God.dumpProcessList) | ||
God.dumpProcessList(function() { | ||
return process.exit(cst.ERROR_EXIT); | ||
}); | ||
else | ||
return process.exit(cst.ERROR_EXIT); | ||
} | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.