UlordChain / ulord-node-stratum-pool

A scalable all-in-one easy to setup cryptocurrency mining pool and portal written entirely in Node.js.
MIT License
63 stars 23 forks source link

Could not parse rpc data from daemon instance #12

Closed pdai closed 6 years ago

pdai commented 6 years ago

coin daemon went into troubles periodically.

2018-05-19 23:59:54 [Pool] [ulord] (Thread 1) Could not parse rpc data from daemon instance 0 Request Data: {"method":"getblocktemplate","params":[],"id":1526745594263} Reponse Data: Work queue depth exceeded 2018-05-19 23:59:55 [Pool] [ulord] (Thread 1) Could not parse rpc data from daemon instance 0 Request Data: {"method":"getblocktemplate","params":[],"id":1526745595268} Reponse Data: Work queue depth exceeded 2018-05-19 23:59:56 [Pool] [ulord] (Thread 1) Could not parse rpc data from daemon instance 0 Request Data: {"method":"getblocktemplate","params":[],"id":1526745596268} Reponse Data: Work queue depth exceeded 2018-05-19 23:59:57 [Pool] [ulord] (Thread 1) Could not parse rpc data from daemon instance 0 Request Data: {"method":"getblocktemplate","params":[],"id":1526745597265} Reponse Data: Work queue depth exceeded 2018-05-19 23:59:58 [Pool] [ulord] (Thread 1) Could not parse rpc data from daemon instance 0 Request Data: {"method":"getblocktemplate","params":[],"id":1526745598268} Reponse Data: Work queue depth exceeded 2018-05-19 23:59:59 [Pool] [ulord] (Thread 1) Could not parse rpc data from daemon instance 0 Request Data: {"method":"getblocktemplate","params":[],"id":1526745599271} Reponse Data: Work queue depth exceeded Execution time: 0 PileUp: 0 Executed operations: 1 Share processor Redis execution time: 8 Executed operations: 3 2018-05-20 00:00:00 [Pool] [ulord] (Thread 1) Block notification via RPC polling send job, login 2018-05-20 00:00:00 [Pool] [ulord] (Thread 1) Block notification via blocknotify script 2018-05-20 00:00:00 [Pool] [ulord] (Thread 2) Block notification via blocknotify script Execution time: 0 PileUp: 0 Executed operations: 1 Share processor Redis execution time: 4 Executed operations: 3 {"name":"ufWxxVg17Q8SHLtKum5GTQ53SmVbPNJYDZ","diff":410,"shares":0.6,"invalidshares":0,"currRoundShares":6.7,"currRoundTime":0,"hashrate":131.072,"hashrateString":"131.07 H/s","luckDays":"4836800.182","luckHours":"116083204.379","paid":0,"balance":0} {"name":"ufWxxVg17Q8SHLtKum5GTQ53SmVbPNJYDZ","diff":410,"shares":0.6,"invalidshares":0,"currRoundShares":6.7,"currRoundTime":0,"hashrate":131.072,"hashrateString":"131.07 H/s","luckDays":"4836800.182","luckHours":"116083204.379","paid":0,"balance":0}

when the error above happened, the coin daemon seems not work. It become normal after a while.

ulord@zonea1:~/UlordChain/src$ ./ulord-cli getblocktemplate error: couldn't parse reply from server ulord@zonea1:~/UlordChain/src$ ./ulord-cli getblocktemplate error: couldn't parse reply from server ulord@zonea1:~/UlordChain/src$ ./ulord-cli getblocktemplate error: couldn't parse reply from server ulord@zonea1:~/UlordChain/src$ ./ulord-cli getblocktemplate error: couldn't parse reply from server ulord@zonea1:~/UlordChain/src$ ./ulord-cli getblocktemplate error: couldn't parse reply from server ulord@zonea1:~/UlordChain/src$ ./ulord-cli getblocktemplate error: couldn't parse reply from server ulord@zonea1:~/UlordChain/src$ ./ulord-cli getblocktemplate error: couldn't parse reply from server ulord@zonea1:~/UlordChain/src$ ./ulord-cli getblocktemplate error: couldn't parse reply from server ulord@zonea1:~/UlordChain/src$ ./ulord-cli getblocktemplate error: couldn't parse reply from server ulord@zonea1:~/UlordChain/src$ ./ulord-cli getblocktemplate error: couldn't parse reply from server ulord@zonea1:~/UlordChain/src$ ./ulord-cli getblocktemplate { "capabilities": [ "proposal" ], "version": 536870912, "previousblockhash": "00000028d3c0116769519258c57486c16d79dcf3b40917bc41db29ece6439385", "transactions": [ ], "coinbaseaux": { "flags": "" }, "coinbasevalue": 11296600000, "longpollid": "00000028d3c0116769519258c57486c16d79dcf3b40917bc41db29ece6439385178", "target": "0000002a68020000000000000000000000000000000000000000000000000000", "mintime": 1526745400, "mutable": [ "time", "transactions", "prevblock" ], "noncerange": "00000000ffffffff", "sigoplimit": 80000, "sizelimit": 4000000, "curtime": 1526745995, "bits": "1d2a6802", "height": 17853, "claimtrie": "0000000000000000000000000000000000000000000000000000000000000000", "masternode": { }, "masternode_payments_started": true, "masternode_payments_enforced": false, "Foundnode": { }, "superblock": [ ], "superblocks_started": true, "superblocks_enabled": true }

ZyanWlayor commented 6 years ago

是这样的,从报错推测来看,因为支付的时候,守护进程由于访问量太大处于不能访问状态,导致支付失败。 1.更新一下矿池版本。 2.将config.json下website.balance.enabled改为false。 3.将config.json下的defaultPoolConfigs.blockRefreshInterval改为1000。 这三个方法都可以降低守护进程压力。

pdai commented 6 years ago

It's already the latest version. Actually there is no node named website.balance.enabled in the config.json, I added it like below, and set the blockRefreshInterval to 1000, the error still exists.

"website": { "enabled": true, "host": "0.0.0.0", "port": 8080, "stratumHost": "cryppit.com", "stats": { "updateInterval": 30, "historicalRetention": 14400, "hashrateWindow": 300 }, "adminCenter": { "enabled": false, "password": "x" }, "tlsOptions" : { "enabled": false, "cert": "", "key": "" }, "balance": { "enabled": false } }

ZyanWlayor commented 6 years ago

请更新最新版本的代码,然后定位到config文件下的clustering.forks,这个参数定义了矿池进程数,最好将其修改为主机CPU核心数的一半。