commit
616ba6500c
14
app.js
14
app.js
@ -136,3 +136,17 @@ process.on('SIGHUP', function() {
|
|||||||
process.on('uncaughtException', function(err) {
|
process.on('uncaughtException', function(err) {
|
||||||
global.logger.error('Uncaught exception: ' + err.stack);
|
global.logger.error('Uncaught exception: ' + err.stack);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (global.gc) {
|
||||||
|
var gcInterval = Number.isFinite(global.environment.gc_interval) ?
|
||||||
|
global.environment.gc_interval :
|
||||||
|
10000;
|
||||||
|
|
||||||
|
if (gcInterval > 0) {
|
||||||
|
setInterval(function gcForcedCycle() {
|
||||||
|
var start = Date.now();
|
||||||
|
global.gc();
|
||||||
|
global.statsClient.timing('windshaft.gc', Date.now() - start);
|
||||||
|
}, gcInterval);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user