Added posix setrlimit / ulimit

This commit is contained in:
Matt 2014-02-20 16:13:50 -07:00
parent 3f048bff7e
commit 1462b6f0b3
3 changed files with 20 additions and 9 deletions

View File

@ -1,16 +1,17 @@
{ {
"name": "Dogecoin", "name": "Litecoin",
"symbol": "doge", "symbol": "ltc",
"algorithm": "scrypt", "algorithm": "scrypt",
"reward": "POW", "reward": "POW",
"address": "nhfNedMmQ1Rjb62znwaiJgFhL3f4NQztSp", "txMessages": false,
"address": "mi4iBXbBsydtcc5yFmsff2zCFVX4XG7qJc",
"stratumPort": 3334, "stratumPort": 3334,
"difficulty": 32, "difficulty": 32,
"blockRefreshInterval": 1, "blockRefreshInterval": 1,
"daemon": { "daemon": {
"host": "localhost", "host": "localhost",
"port": 19334, "port": 19332,
"user": "testnet", "user": "litecoinrpc",
"password": "testnet" "password": "testnet"
}, },
"varDiff": { "varDiff": {

View File

@ -1,9 +1,18 @@
var fs = require('fs'); var fs = require('fs');
var posix = require('posix');
var Stratum = require('stratum-pool'); var Stratum = require('stratum-pool');
var PoolLogger = require('./libs/logutils.js'); var PoolLogger = require('./libs/logutils.js');
JSON.minify = JSON.minify || require("node-json-minify"); JSON.minify = JSON.minify || require("node-json-minify");
try{
posix.setrlimit('nofile', { soft: 100000 });
}
catch(e){
console.error(e);
}
var loggerInstance = new PoolLogger({ var loggerInstance = new PoolLogger({
'default': true, 'default': true,
'keys': { 'keys': {

View File

@ -6,7 +6,8 @@
"dependencies": { "dependencies": {
"stratum-pool": "zone117x/node-stratum", "stratum-pool": "zone117x/node-stratum",
"dateformat": "*", "dateformat": "*",
"node-json-minify": "*" "node-json-minify": "*",
"posix": "*"
}, },
"devDependencies": {}, "devDependencies": {},
"scripts": { "scripts": {