mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-18 12:01:02 +01:00
test: set number of RPC server threads to 2
The default `-rpcthreads` value spawns 16 HTTP server threads for each node. Running the functional test suite with default `rpcthreads` can exhaust file descriptors or hit other resource limits very easily. Moreover, having 16 threads is unnecessary since they are mostly idle. We run RPC calls on a single RPC connection and wait for it result synchronously. There is (almost) never two RPC calls occurring concurrently. Because of this, the threads are mostly idle, so we can safely limit the number of them to two.
This commit is contained in:
@@ -444,6 +444,7 @@ def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect=
|
||||
# Disable server-side timeouts to avoid intermittent issues
|
||||
f.write("rpcservertimeout=99000\n")
|
||||
f.write("rpcdoccheck=1\n")
|
||||
f.write("rpcthreads=2\n")
|
||||
f.write("fallbackfee=0.0002\n")
|
||||
f.write("server=1\n")
|
||||
f.write("keypool=1\n")
|
||||
|
||||
Reference in New Issue
Block a user