z-classic / z-nomp

z-nomp is mining pool software for Zcash and Zclassic so you can create internet money in your home!
MIT License
291 stars 437 forks source link

Server stops from working very fast after running #315

Closed theicosuperman closed 6 years ago

theicosuperman commented 6 years ago

Hello. I'm running a currrent version 28.03.2018 of z-nomp with Hush Daemon version v1.0.13-743ac166 on node v9.8.0 with redis Redis server v=3.2.11 on Linux Deb94-amd64 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux I have made a simple bash script for restarting my server `

!/bin/bash

while true do

        sleep 5
    echo $(date) >> z-nomp.dates.log
        npm start >> z-nomp.log 2>&1
    done

`

So, in my log file I see it like this

Thu Mar 29 11:46:04 CEST 2018 Thu Mar 29 11:46:09 CEST 2018 Thu Mar 29 11:46:15 CEST 2018 Thu Mar 29 11:46:20 CEST 2018 Thu Mar 29 11:46:25 CEST 2018 Thu Mar 29 12:37:49 CEST 2018 Thu Mar 29 12:39:08 CEST 2018 Thu Mar 29 12:39:44 CEST 2018 Thu Mar 29 12:57:39 CEST 2018 Thu Mar 29 12:57:44 CEST 2018 Thu Mar 29 12:57:49 CEST 2018 Thu Mar 29 12:58:29 CEST 2018

I did a configuration with HUSH coin, the daemon is working fine, so redei is.

I will put my pool_config in case you can get an idea of configuration hush-pool.json ` { "enabled": true, "coin": "hush.json",

"address": "INTENTIONALLY DELETED",
"_comment_address": "a transparent address to send coinbase rewards to and to transfer to zAddress.",
"zAddress": "INTENTIONALLY DELETED",
"_comment_zAddress": "a private address used to send coins to tAddress.",
"tAddress":"INTENTIONALLY DELETED",
"_comment_tAddress": "transparent address used to send payments, make this a different address, otherwise payments will not send",

    "walletInterval": 2.5,

"rewardRecipients": {
"t1JGx2pfoErnsDaHmSsa9PoYjySqgzBvAMb": "0.02"
},

"paymentProcessing": {
"minConf": 10,
    "enabled": true,
    "paymentMode": "prop",
    "_comment_paymentMode":"prop, pplnt",
    "paymentInterval": 120,
    "minimumPayment": 1,
    "maxBlocksPerPayment": 10,
    "daemon": {
        "host": "127.0.0.1",
        "port": 19555,
        "user": "INTENTIONALLY DELETED",
        "password": "INTENTIONALLY DELETED"
    }
},

"tlsOptions": {
    "enabled": false,
    "serverKey":"",
    "serverCert":"",
    "ca":""
},

"ports": {
    "3032": {
        "diff": 263991325,
        "tls": false,
        "varDiff": {
            "minDiff": 200000000,
            "maxDiff": 300000000,
            "targetTime": 15,
            "retargetTime": 60,
            "variancePercent": 30
        }
    }
},
"daemons": [
{
        "host": "127.0.0.1",
        "port": 19555,
        "user": "INTENTIONALLY DELETED",
        "password": "INTENTIONALLY DELETED"
    }
],

    "p2p": {
    "enabled": false,
    "host": "127.0.0.1",
    "port": 19333,
    "disableTransactions": true
},

"mposMode": {
    "enabled": false,
    "host": "127.0.0.1",
    "port": 3306,
    "user": "INTENTIONALLY DELETED",
    "password": "INTENTIONALLY DELETED",
    "database": "zec",
    "checkPassword": true,
    "autoCreateWorker": false
}

} `

config.json ` { "logLevel": "debug", "logColors": true,

"cliPort": 17117,

"clustering": {
    "enabled": true,
    "forks": "auto"
},

"defaultPoolConfigs": {
    "blockRefreshInterval": 500,
    "jobRebroadcastTimeout": 55,
    "connectionTimeout": 600,
    "emitInvalidBlockHashes": false,
    "validateWorkerUsername": true,
    "tcpProxyProtocol": false,
    "banning": {
        "enabled": true,
        "time": 600,
        "invalidPercent": 50,
        "checkThreshold": 500,
        "purgeInterval": 300
    },
    "redis": {
        "host": "127.0.0.1",
        "port": 6379,
        "password": ""
    }
},

"website": {
    "enabled": true,
    "host": "INTENTIONALLY DELETED",
    "port": 8082,
    "stratumHost": "INTENTIONALLY DELETED",
    "stats": {
        "updateInterval": 30,
        "historicalRetention": 14400,
        "hashrateWindow": 300
    },
    "adminCenter": {
        "enabled": true,
        "password": "INTENTIONALLY DELETED"
    },
    "tlsOptions" : {
        "enabled": false,
        "cert": "",
        "key": ""
    }
},

"blockNotifyListener": { "enabled":true, "port":17117 },

"redis": {
    "host": "127.0.0.1",
    "port": 6379
},

"switching": {
    "hush": {
        "enabled": false,
        "algorithm": "equihash",
        "ports": {
            "3032": {
                "diff": 10,
                "varDiff": {
                    "minDiff": 16,
                    "maxDiff": 512,
                    "targetTime": 15,
                    "retargetTime": 90,
                    "variancePercent": 30
                }
            }
        }
    }

},

"profitSwitch": {
    "enabled": false,
    "updateInterval": 600,
    "depth": 0.90,
    "usePoloniex": true,
    "useCryptsy": true,
    "useMintpal": true,
    "useBittrex": true
}

} coin\hush.json { "name": "hush", "symbol": "hush", "algorithm": "equihash", "requireShielding": true, "txfee": 0.0001 } `Where to look for what happens to a server, how to make it more stable - maybe you will suggest

theicosuperman commented 6 years ago

I finally resolved it by running as a root and using forever -c "npm start" -l /root/z-nomp.log ./