util: Handle HTTP_SERVICE_UNAVAILABLE in bitcoin-cli #18523

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:20200404-rpc-depth changing 2 files +3 −1
  1. hebasto commented at 3:14 PM on April 4, 2020: member

    On master (c8971547d9c9460fcbec6f54888df83f002c3dfd) the bitcoin-cli does not handle the "work queue depth exceeded" event properly.

    Steps to reproduce:

    # terminal 0
    ./src/bitcoind -debug=rpc -rpcthreads=1 -rpcworkqueue=1
    
    # terminal 1
    ./src/bitcoin-cli gettxoutsetinfo
    
    # terminal 2
    ./src/bitcoin-cli gettxoutsetinfo
    
    # terminal 3
    ./src/bitcoin-cli gettxoutsetinfo
    error: couldn't parse reply from server
    

    Expected behavior

    Get a message from a server that work queue depth exceeded.

    Actual behavior

    Got the misleading message "couldn't parse reply from server".


    With this PR:

    # terminal 0
    ./src/bitcoind -debug=rpc -rpcthreads=1 -rpcworkqueue=1
    
    # terminal 1
    ./src/bitcoin-cli gettxoutsetinfo
    
    # terminal 2
    ./src/bitcoin-cli gettxoutsetinfo
    
    # terminal 3
    ./src/bitcoin-cli gettxoutsetinfo
    error: Server response: Work queue depth exceeded
    

    UPDATE: apparently, it is an alternative to #18335

  2. hebasto renamed this:
    util: Handle HTTP_INTERNAL_SERVER_ERROR in bitcoin-cli
    [WIP] util: Handle HTTP_INTERNAL_SERVER_ERROR in bitcoin-cli
    on Apr 4, 2020
  3. util: Handle HTTP_SERVICE_UNAVAILABLE in bitcoin-cli 2ed28772d4
  4. hebasto force-pushed on Apr 4, 2020
  5. hebasto renamed this:
    [WIP] util: Handle HTTP_INTERNAL_SERVER_ERROR in bitcoin-cli
    util: Handle HTTP_SERVICE_UNAVAILABLE in bitcoin-cli
    on Apr 4, 2020
  6. practicalswift commented at 4:24 PM on April 4, 2020: contributor

    Concept ACK

  7. DrahtBot added the label RPC/REST/ZMQ on Apr 4, 2020
  8. DrahtBot commented at 7:08 PM on April 4, 2020: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #18335 (bitcoin-cli: print useful error if bitcoind rpc work queue exceeded by LarryRuane)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  9. hebasto commented at 7:33 PM on April 4, 2020: member

    Oh, I didn't see #18335.

  10. LarryRuane commented at 7:59 PM on April 4, 2020: contributor

    I like your solution better; I cherry-picked your commit to my PR, #18335.

  11. hebasto commented at 8:24 PM on April 4, 2020: member

    Closed in favor of #18335.

  12. hebasto closed this on Apr 4, 2020

  13. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me