Removed posix module from being installed by default

This commit is contained in:
Matt 2014-04-05 15:47:00 -06:00
parent f12fd830f2
commit 323c8b669d
2 changed files with 10 additions and 4 deletions

11
init.js
View File

@ -4,7 +4,6 @@ var os = require('os');
var cluster = require('cluster'); var cluster = require('cluster');
var async = require('async'); var async = require('async');
var posix = require('posix');
var PoolLogger = require('./libs/logUtil.js'); var PoolLogger = require('./libs/logUtil.js');
var BlocknotifyListener = require('./libs/blocknotifyListener.js'); var BlocknotifyListener = require('./libs/blocknotifyListener.js');
var RedisBlocknotifyListener = require('./libs/redisblocknotifyListener.js'); var RedisBlocknotifyListener = require('./libs/redisblocknotifyListener.js');
@ -41,10 +40,18 @@ try {
//Try to give process ability to handle 100k concurrent connections //Try to give process ability to handle 100k concurrent connections
try{ try{
var posix = require('posix');
try {
posix.setrlimit('nofile', { soft: 100000, hard: 100000 }); posix.setrlimit('nofile', { soft: 100000, hard: 100000 });
}
catch(e){
if (cluster.isMaster)
logger.warning('POSIX', 'Connection Limit', '(Safe to ignore) Must be ran as root to increase resource limits');
}
} }
catch(e){ catch(e){
logger.warning('POSIX', 'Connection Limit', '(Safe to ignore) Must be ran as root to increase resource limits'); if (cluster.isMaster)
logger.debug('POSIX', 'Connection Limit', '(Safe to ignore) POSIX module not installed and resource (connection) limit was not raised');
} }

View File

@ -34,7 +34,6 @@
"stratum-pool": "git://github.com/zone117x/node-stratum-pool.git", "stratum-pool": "git://github.com/zone117x/node-stratum-pool.git",
"dateformat": "*", "dateformat": "*",
"node-json-minify": "*", "node-json-minify": "*",
"posix": "*",
"redis": "*", "redis": "*",
"mysql": "*", "mysql": "*",
"async": "*", "async": "*",