Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors on Loading historical data for chain=main on startup #214

Closed
pointbiz opened this issue May 21, 2020 · 0 comments
Closed

Errors on Loading historical data for chain=main on startup #214

pointbiz opened this issue May 21, 2020 · 0 comments
Labels

Comments

@pointbiz
Copy link
Contributor

Describe the bug

The bug happens at start up. This is how I'm starting:
btc-rpc-explorer -i 192.168.1.76 -p 3002

Environment (please complete the following information):

  • Bitcoin Core / Node Version
    0.18.0
  • NodeJS Version
    v8.10.0
  • Browser [e.g. chrome, safari]
  • Code Version / Commit
    v2.0.0

Configuration file content
BTCEXP_HOST=192.168.1.76
BTCEXP_PRIVACY_MODE=true

Please include the content from the following files. BE SURE TO MODIFY YOUR CREDENTIALS BEFORE SUBMITTING!!!

  • bitcoin.conf
    daemon=1
    server=1
    rpcuser=bitcoinrpc
    txindex=1
    rpcport=8332
    listen=1
    listenonion=0
    whitelist=192.168.1.0/24
    disablewallet=1
    minrelaytxfee=0.00001000
    maxconnections=25

To Reproduce

Steps to reproduce the behavior:

  1. btc-rpc-explorer -i 192.168.1.76 -p 3002

I have an extremely slow node with an arm processor. One of the "bitseed v2" models.
I think it cannot handle the fun historical requests that are being sent on startup. Can those extra calls be moved into the slow device section? If that is something that would help.

Screenshots or Log Output

Add any other context about the problem here.
Loading env file: /home/bitcoin/.config/btc-rpc-explorer.env
Loading RPC cookie file: /home/bitcoin/.bitcoin/.cookie
btcexp:app Starting BTC RPC Explorer, v2.0.0 +0ms
btcexp:app Connecting to RPC node at 127.0.0.1:8332 +1ms
btcexp:app Verifying RPC connection... +51ms
btcexp:app Loading mining pools config +4ms
btcexp:app RPC Connected: version=180000 subversion=/Satoshi:0.18.0/, parsedVersion(used for RPC versioning)=0.18.0, protocolversion=70015, chain=main, services=000000000000040d +138ms
btcexp:app Loading historical data for chain=main +0ms
btcexp:app Skipping performance-intensive task: fetch UTXO set summary. This is skipped due to the flag 'slowDeviceMode' which defaults to 'true' to protect slow nodes. Set this flag to 'false' to enjoy UTXO set summary details. +1ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +0ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +2ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +1ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +1ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +1ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +1ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +2ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +1ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +1ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +1ms
btcexp:app Unhandled Rejection at: Promise Promise {
{ Error: ESOCKETTIMEDOUT
at ClientRequest. (/usr/local/lib/node_modules/btc-rpc-explorer/node_modules/request/request.js:816:19)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at ClientRequest.emit (events.js:208:7)
at Socket.emitTimeout (_http_client.js:711:34)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Socket.emit (events.js:208:7)
at Socket._onTimeout (net.js:420:8)
at ontimeout (timers.js:482:11)
at tryOnTimeout (timers.js:317:5)
at Timer.listOnTimeout (timers.js:277:5)
cause: { Error: ESOCKETTIMEDOUT
at ClientRequest. (/usr/local/lib/node_modules/btc-rpc-explorer/node_modules/request/request.js:816:19)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at ClientRequest.emit (events.js:208:7)
at Socket.emitTimeout (_http_client.js:711:34)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Socket.emit (events.js:208:7)
at Socket._onTimeout (net.js:420:8)
at ontimeout (timers.js:482:11)
at tryOnTimeout (timers.js:317:5)
at Timer.listOnTimeout (timers.js:277:5) code: 'ESOCKETTIMEDOUT', connect: false },
isOperational: true,
code: 'ESOCKETTIMEDOUT',
connect: false } } reason: { Error: ESOCKETTIMEDOUT
at ClientRequest. (/usr/local/lib/node_modules/btc-rpc-explorer/node_modules/request/request.js:816:19)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at ClientRequest.emit (events.js:208:7)
at Socket.emitTimeout (_http_client.js:711:34)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Socket.emit (events.js:208:7)
at Socket._onTimeout (net.js:420:8)
at ontimeout (timers.js:482:11)
at tryOnTimeout (timers.js:317:5)
at Timer.listOnTimeout (timers.js:277:5)
cause: { Error: ESOCKETTIMEDOUT
at ClientRequest. (/usr/local/lib/node_modules/btc-rpc-explorer/node_modules/request/request.js:816:19)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at ClientRequest.emit (events.js:208:7)
at Socket.emitTimeout (_http_client.js:711:34)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Socket.emit (events.js:208:7)
at Socket._onTimeout (net.js:420:8)
at ontimeout (timers.js:482:11)
at tryOnTimeout (timers.js:317:5)
at Timer.listOnTimeout (timers.js:277:5) code: 'ESOCKETTIMEDOUT', connect: false },
isOperational: true,
code: 'ESOCKETTIMEDOUT',
connect: false } stack: Error: ESOCKETTIMEDOUT
at ClientRequest. (/usr/local/lib/node_modules/btc-rpc-explorer/node_modules/request/request.js:816:19)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at ClientRequest.emit (events.js:208:7)
at Socket.emitTimeout (_http_client.js:711:34)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Socket.emit (events.js:208:7)
at Socket._onTimeout (net.js:420:8)
at ontimeout (timers.js:482:11)
at tryOnTimeout (timers.js:317:5)
at Timer.listOnTimeout (timers.js:277:5) +5s
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +5s
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +2ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +1ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +1ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +1ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +1ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +1ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +2ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +1ms
btcexp:error Error 38eh39hdee: Error: ESOCKETTIMEDOUT, json: {"cause":{"code":"ESOCKETTIMEDOUT","connect":false},"isOperational":true,"code":"ESOCKETTIMEDOUT","connect":false}, userData: [object Object] (json: {}) +1ms
Error: ESOCKETTIMEDOUT
at ClientRequest. (/usr/local/lib/node_modules/btc-rpc-explorer/node_modules/request/request.js:816:19)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at ClientRequest.emit (events.js:208:7)
at Socket.emitTimeout (_http_client.js:711:34)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Socket.emit (events.js:208:7)
at Socket._onTimeout (net.js:420:8)
at ontimeout (timers.js:482:11)
at tryOnTimeout (timers.js:317:5)
at Timer.listOnTimeout (timers.js:277:5)
undefined:1
Work queue depth exceeded
^

SyntaxError: Unexpected token W in JSON at position 0
at JSON.parse ()
at obfuscateResponse (/usr/local/lib/node_modules/btc-rpc-explorer/node_modules/bitcoin-core/dist/src/logging/request-obfuscator.js:60:23)
at obfuscate (/usr/local/lib/node_modules/btc-rpc-explorer/node_modules/bitcoin-core/dist/src/logging/request-obfuscator.js:142:3)
at /usr/local/lib/node_modules/btc-rpc-explorer/node_modules/bitcoin-core/dist/src/logging/request-logger.js:24:36
at Request. (/usr/local/lib/node_modules/btc-rpc-explorer/node_modules/@uphold/request-logger/src/index.js:33:9)
at emitTwo (events.js:131:20)
at Request.emit (events.js:214:7)
at Request. (/usr/local/lib/node_modules/btc-rpc-explorer/node_modules/request/request.js:1154:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage. (/usr/local/lib/node_modules/btc-rpc-explorer/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)

@pointbiz pointbiz added the bug label May 21, 2020
sickpig pushed a commit to sickpig/bch-rpc-explorer that referenced this issue Jun 3, 2020
Agree with @pointbiz that the blast of blockstats requests made on startup (to calculate 24hr volume) should be blocked on "slow devices".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant