rpc: increase the defaults for -rpcthreads and -rpcworkqueue

`rpcthreads` was introduced with a default of 4 in 2013 in
21eb5adadb

`rpcworkqueue` was introduced with a default of 16 in 2015 in
40b556d374

Resolves: https://github.com/bitcoin/bitcoin/issues/29386
This commit is contained in:
Vasil Dimov
2024-11-04 16:54:41 +01:00
parent 6463117a29
commit e56fc7ce6a
2 changed files with 12 additions and 3 deletions

View File

@@ -14,8 +14,17 @@ namespace util {
class SignalInterrupt;
} // namespace util
static const int DEFAULT_HTTP_THREADS=4;
static const int DEFAULT_HTTP_WORKQUEUE=16;
/**
* The default value for `-rpcthreads`. This number of threads will be created at startup.
*/
static const int DEFAULT_HTTP_THREADS=16;
/**
* The default value for `-rpcworkqueue`. This is the maximum depth of the work queue,
* we don't allocate this number of work queue items upfront.
*/
static const int DEFAULT_HTTP_WORKQUEUE=64;
static const int DEFAULT_HTTP_SERVER_TIMEOUT=30;
struct evhttp_request;