HomePhabricator

util: Handle HTTP_SERVICE_UNAVAILABLE in bitcoin-cli

Description

util: Handle HTTP_SERVICE_UNAVAILABLE in bitcoin-cli

Summary:

If bitcoind is processing 16 RPC requests, attempting to submit another request using bitcoin-cli produces this less-than-helpful error message: error: couldn't parse reply from server. This PR changes the error to: error: server response: Work queue depth exceeded.

This is a backport of core#18335 and core#21484

Test Plan:

$ src/bitcoind -rpcworkqueue=1 -daemonwait=1
$ sleep 10
$ seq 10 | while read i;do src/bitcoin-cli getblockchaininfo  >/dev/null&done
error: Server response: Work queue depth exceeded
error: Server response: Work queue depth exceeded
$ src/bitcoin-cli stop

ninja all check-all

Reviewers: #bitcoin_abc, sdulfari

Reviewed By: #bitcoin_abc, sdulfari

Subscribers: sdulfari

Differential Revision: https://reviews.bitcoinabc.org/D13182

Details

Provenance
Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>Authored on Apr 4 2020, 15:02
PiRKCommitted on Feb 28 2023, 18:55
PiRKPushed on Feb 28 2023, 18:55
Reviewer
Restricted Project
Differential Revision
D13182: util: Handle HTTP_SERVICE_UNAVAILABLE in bitcoin-cli
Parents
rABCdfa3cc728d5e: validation, test, bench: make CScriptCheck and prevector swap member functions…
Branches
Unknown
Tags
Unknown