From dda5228e02ca6a839bf87ae7dbd133547563816a Mon Sep 17 00:00:00 2001 From: Andrew Toth Date: Sat, 27 Sep 2025 12:08:16 -0400 Subject: [PATCH] test: set par=2 in default config for functional test framework Depending on the host machine, a default `par` value can spawn up to 15 script verification threads for each node. Running the functional test suite with default `par` can exhaust file descriptors or hit other resource limits when many threads are spawned. These threads are mostly idle and the same code paths are executed with a value of `par=2`. Limit this to 2 for functional tests that do not override the default option. Co-authored-by: maflcko <6399679+maflcko@users.noreply.github.com> --- 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 e5a5938f07c..da90e37403e 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -474,6 +474,7 @@ def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect= # min_required_fds = MIN_CORE_FDS + MAX_ADDNODE_CONNECTIONS + nBind = 151 + 8 + 3 = 162; # nMaxConnections = available_fds - min_required_fds = 256 - 161 = 94; f.write("maxconnections=94\n") + f.write("par=" + str(min(2, os.cpu_count())) + "\n") f.write(extra_config)