UPDATE: see #16979 (comment)
Having a default number (DEFAULT_HTTP_THREADS=4;
) of HTTP worker threads.
A single gettxoutsetinfo
RPC call returns:
0hebasto@odroid:~$ time bitcoin-cli gettxoutsetinfo
1{
2 "height": 596966,
3 "bestblock": "0000000000000000000016b72d77ce09ff1ffd98824e671e92c4e6b536e05b2c",
4 "transactions": 36147771,
5 "txouts": 62227414,
6 "bogosize": 4681101424,
7 "hash_serialized_2": "5523a667c0b00094c104b37f85d469b8db9c7615d861e17a22bbdef36717f3e1",
8 "disk_size": 3761251169,
9 "total_amount": 17961904.82206827
10}
11
12real 6m36.365s
13user 0m0.006s
14sys 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:
0hebasto@odroid:~$ time bitcoin-cli gettxoutsetinfo
1error: Could not connect to the server 127.0.0.1:8332 (error code 0 - "timeout reached")
2
3Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
4
5real 15m0.120s
6user 0m0.008s
7sys 0m0.012s
… and two worker threads do not sleep and still consume CPU cycles until too long.bitcoind
is stopped
System information
0hebasto@odroid:~$ bitcoind -version | head -n 1
1Bitcoin Core Daemon version v0.18.0
2hebasto@odroid:~$ lsb_release -ds
3Ubuntu 18.04.3 LTS
Hardware: ODROID-HC1