smp-server: limit concurrency in proxy command processing (#1162)

* smp: put client proxy command processing threads under a shared semaphore

* add LIMITS.max_proc_threads to server config

* rename to PROXY.client_concurrency

* retry on strictly greater than max concurrency

* set default to 16

* rename

* fix limit

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
Alexander Bondarenko
2024-05-21 12:53:33 +01:00
committed by GitHub
co-authored by Evgeny Poberezkin
parent e3f5d244c1
commit f50fa5c60b
4 changed files with 45 additions and 18 deletions
+2 -1
View File
@@ -119,7 +119,8 @@ cfg =
transportConfig = defaultTransportServerConfig {Server.alpn = Just supportedSMPHandshakes},
controlPort = Nothing,
smpAgentCfg = defaultSMPClientAgentConfig,
allowSMPProxy = False
allowSMPProxy = False,
serverClientConcurrency = 2
}
cfgV7 :: ServerConfig