From e9cd45e3d3c7592265ebf67387090b3df1501df4 Mon Sep 17 00:00:00 2001 From: furszy Date: Wed, 22 Oct 2025 08:07:34 -0400 Subject: [PATCH] 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. --- test/functional/test_framework/util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index da90e37403e..d7ffed87768 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -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")