Skip to content

rpc: Worker threads still run after timeout error for two gettxoutsetinfo RPC calls #16979

@hebasto

Description

@hebasto

UPDATE: see #16979 (comment)

Having a default number (DEFAULT_HTTP_THREADS=4;) of HTTP worker threads.

A single gettxoutsetinfo RPC call returns:

hebasto@odroid:~$ time bitcoin-cli gettxoutsetinfo
{
  "height": 596966,
  "bestblock": "0000000000000000000016b72d77ce09ff1ffd98824e671e92c4e6b536e05b2c",
  "transactions": 36147771,
  "txouts": 62227414,
  "bogosize": 4681101424,
  "hash_serialized_2": "5523a667c0b00094c104b37f85d469b8db9c7615d861e17a22bbdef36717f3e1",
  "disk_size": 3761251169,
  "total_amount": 17961904.82206827
}

real	6m36.365s
user	0m0.006s
sys	0m0.012s

... and a worker thread gets the "sleeping" status (from the top output).

When running two gettxoutsetinfo RPC calls from two terminals (nearly) simultaneously, each of them returns with a timeout error:

hebasto@odroid:~$ time bitcoin-cli gettxoutsetinfo
error: Could not connect to the server 127.0.0.1:8332 (error code 0 - "timeout reached")

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.

real	15m0.120s
user	0m0.008s
sys	0m0.012s

... and two worker threads do not sleep and still consume CPU cycles until bitcoind is stopped too long.

System information

hebasto@odroid:~$ bitcoind -version | head -n 1
Bitcoin Core Daemon version v0.18.0
hebasto@odroid:~$ lsb_release -ds
Ubuntu 18.04.3 LTS

Hardware: ODROID-HC1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions