When I make a highly concurrent request to bitcoin core, a new block appears and all my requests get blocked #29384

issue Rodert openend this issue on February 5, 2024
  1. Rodert commented at 6:12 am on February 5, 2024: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    When I make a highly concurrent request to bitcoin core, a new block appears and all my requests get blocked

    Expected behaviour

    ok

    Steps to reproduce

    When I make a highly concurrent request to bitcoin core, a new block appears and all my requests get blocked

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Package manager

    What version of Bitcoin Core are you using?

    v25.0

    Operating system and version

    ubuntu 22.04 LTS

    Machine specifications

    No response

  2. glozow commented at 8:55 am on February 5, 2024: member
    Is it blocked forever or until the block is finished processing? Can you provide more details about what your highly concurrent request is?
  3. fanquake commented at 9:43 am on February 5, 2024: member

    Package manager

    Which package manager?

    Can you provide any debug.log output?

  4. Rodert commented at 9:23 am on February 6, 2024: none

    Is it blocked forever or until the block is finished processing? Can you provide more details about what your highly concurrent request is?

    this . I used golang to initiate rpc getblock and so on for the http request node, 30 concurrent continuous calls. As you can see from the load monitoring of the server, every time a new block is synchronized, the program is stuck.

    i use bitcoin version bitcoin-25.0 by Linux *.0-91-generic [#101](/bitcoin-bitcoin/101/)-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

  5. Rodert commented at 9:30 am on February 6, 2024: none

    Package manager

    Which package manager?

    Can you provide any debug.log output?

    i use bitcoin version bitcoin-25.0 by Linux *.0-91-generic [#101](/bitcoin-bitcoin/101/)-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux .

    Here are some error messages encountered, But I don’t know if it matters.

     02024-02-05T06:13:24Z BlockUntilSyncedToCurrentChain: txindex is catching up on block notifications
     12024-02-05T06:27:32Z Saw new header hash=0000000000000000000380aa9f106ee0d0eb3ae7e0710d9562663f0d65c25de1 height=829003
     22024-02-05T06:27:32Z [net] Saw new cmpctblock header hash=0000000000000000000380aa9f106ee0d0eb3ae7e0710d9562663f0d65c25de1 peer=15
     32024-02-05T06:27:38Z UpdateTip: new best=0000000000000000000380aa9f106ee0d0eb3ae7e0710d9562663f0d65c25de1 height=829003 version=0x22000000 log2_work=94.711169 tx=962396874 date='2024-02-05T06:26:35Z' progress=1.000000 cache=210.9MiB(1465958txo)
     42024-02-05T06:27:38Z BlockUntilSyncedToCurrentChain: txindex is catching up on block notifications
     52024-02-05T06:27:38Z BlockUntilSyncedToCurrentChain: txindex is catching up on block notifications
     62024-02-05T06:27:38Z BlockUntilSyncedToCurrentChain: txindex is catching up on block notifications
     72024-02-05T06:27:38Z BlockUntilSyncedToCurrentChain: txindex is catching up on block notifications
     82024-02-05T06:30:30Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
     92024-02-05T06:30:30Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
    102024-02-05T06:30:30Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
    112024-02-05T06:30:30Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
    122024-02-05T06:30:36Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
    132024-02-05T06:30:36Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
    142024-02-05T06:30:36Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
    152024-02-05T06:30:36Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
    162024-02-05T06:30:36Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
    
  6. Rodert commented at 9:32 am on February 6, 2024: none
    I’ve reduced the concurrency now, the problem is happening less often, but it’s not completely solved
  7. maflcko commented at 9:41 am on February 6, 2024: member
    -rpcthreads= should be at least as large as the number of concurrent requests you are doing, otherwise there won’t be any threads to service the query and the work-queue will eventually overflow.
  8. maflcko added the label Questions and Help on Feb 6, 2024
  9. maflcko added the label RPC/REST/ZMQ on Feb 6, 2024
  10. maflcko commented at 10:11 am on February 6, 2024: member
    Related: #29386?
  11. maflcko commented at 6:06 pm on February 8, 2024: member
    Closing for now. Let us know if this is still an issue after #29384 (comment)
  12. maflcko closed this on Feb 8, 2024


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: 2024-11-21 12:12 UTC

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