VeriBlock / vbk-ri-btc

Bitcoin Core integration/staging tree
https://bitcoincore.org/en/download
Other
4 stars 6 forks source link

Socket timeout has been expired #162

Closed Leonardiae closed 4 years ago

Leonardiae commented 4 years ago

Seeing a lot of socket timeout warnings on the APM console (after 1-4 retries it is succesfull most of the time):

2020-06-10 15:30:13 pop-tasks- WARN  ApmTaskService            - Error submitting proof of proof: Socket timeout has been expired [url=http://localhost:18332/, socket_timeout=unknown] ms
2020-06-10 15:30:13 pop-tasks- WARN  TaskService               - [vbtc7e6f56b3] Task 'Submit Proof of Proof' has failed: Error submitting proof of proof
2020-06-10 15:30:13 pop-tasks- INFO  TaskService               - [vbtc7e6f56b3] Will try again in 40 seconds...

vBitcoin debug.log only shows that the rpc was called, nothing else: 2020-06-10T13:30:13Z VeriBlock-PoP: submitpop RPC called with 1 ATV and 15 VTBs

overcookedpanda commented 4 years ago

This is happening for me locally as well, it seems to happen when the vBTC chain has stalled, or blocks are slow.

Warchant commented 4 years ago

TLDR - this is performance issue. Will be solved in next releases.

This happens because we lock main mutex when vBTC does any state change. And it is held until state change is complete.

The alt-cpp lib is not optimized too much, and it can do thousands state changes internally upon every vBTC state change, which significantly decreases performance...

Leonardiae commented 4 years ago

I think you are right, even if I do a simple getblockcount RPC call directly to vBitcoin it often times out.

Warchant commented 4 years ago

Basically if your node is not doing sync or pow mining (with pop txes), it will be responsible as usual.

Leonardiae commented 4 years ago
getdebuginfo
Running several checks, this may take a few moments...
Run Diagnostic Info: {
  "user_language": "en",
  "java_runtime_name": "Java(TM) SE Runtime Environment",
  "sun_boot_library_path": "C:\\Program Files\\Java\\jre1.8.0_221\\bin",
  "java_runtime_version": "1.8.0_221-b11",
  "java_specification_version": "1.8",
  "os_name": "Windows 10",
  "os_arch": "amd64",
  "os_version": "10.0",
  "memory_total_gb": "1.35 GB",
  "memory_max_gb": "14.20 GB",
  "processor_count": "24",
  "processor_type": "AMD64 Family 23 Model 1 Stepping 1, AuthenticAMD",
  "working_directory": "E:\\altchain-pop-miner-0.4.9-rc.5.dev.12_1\\bin",
  "datetime_now_utc": "2020-06-10 17:40:34.229+0200"
}
SUCCESS - NodeCore connection: Connected
SUCCESS - NodeCore synchronization status: Synchronized (LocalHeight=588618 NetworkHeight=588617)
SUCCESS - vBitcoin connection: Connected
2020-06-10 17:40:42 main       WARN  BitcoinFamilyChain        - Unable to perform the getblockchaininfo rpc call to http://localhost:18332 (is it reachable?)
FAIL- vBitcoin synchronization status: Not synchronized, 0 blocks left (LocalHeight=0 NetworkHeight=0)
SUCCESS - The PoP wallet contains sufficient funds, current balance: 1019.25856000 tVBK
200 success (8.302 s)

Node was not doing any mining and all operations in the Altpopminer are waiting for payout block. Few seconds later:

getdebuginfo
Running several checks, this may take a few moments...
Run Diagnostic Info: {
  "user_language": "en",
  "java_runtime_name": "Java(TM) SE Runtime Environment",
  "sun_boot_library_path": "C:\\Program Files\\Java\\jre1.8.0_221\\bin",
  "java_runtime_version": "1.8.0_221-b11",
  "java_specification_version": "1.8",
  "os_name": "Windows 10",
  "os_arch": "amd64",
  "os_version": "10.0",
  "memory_total_gb": "1.35 GB",
  "memory_max_gb": "14.20 GB",
  "processor_count": "24",
  "processor_type": "AMD64 Family 23 Model 1 Stepping 1, AuthenticAMD",
  "working_directory": "E:\\altchain-pop-miner-0.4.9-rc.5.dev.12_1\\bin",
  "datetime_now_utc": "2020-06-10 17:40:58.985+0200"
}
SUCCESS - NodeCore connection: Connected
SUCCESS - NodeCore synchronization status: Synchronized (LocalHeight=588619 NetworkHeight=588619)
SUCCESS - vBitcoin connection: Connected
SUCCESS - vBitcoin synchronization status: Synchronized (LocalHeight=873 NetworkHeight=873)
SUCCESS - The PoP wallet contains sufficient funds, current balance: 1019.25856000 tVBK
200 success (9.798 ms)

My point is that this is not what I usual see on other nodes I'm running. But I guess this is related to what you told earlier regarding the performance issues.

Warchant commented 4 years ago

No longer true in Beta.