merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 533fe5c9c0bc1b497ca765cde295511a9cbc6084
parent c465c00f6b06715d05adb1dc91e2f3fcc2f51302
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 15 Nov 2026 16:38:39 +0100

fix #12138

Diffstat:
Msrc/backend/taler-merchant-httpd.c | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c @@ -66,6 +66,17 @@ #define UNIX_BACKLOG 500 /** + * Maximum number of concurrent connections per HTTP daemon. + * TALER_MHD_daemon_start() keeps our descriptors below FD_SETSIZE + * (1024). 300 connections is plenty, same as exchange. At the + * limit, MHD stops accepting, so that other taler-merchant-httpd + * processes sharing the listen socket (as high-performance setups do + * via systemd) take the connection. + */ +#define CONNECTION_LIMIT 300 + + +/** * Default maximum upload size permitted. Can be overridden * per handler. */ @@ -1116,6 +1127,8 @@ start_daemon (void *cls, &handle_mhd_completion_callback, NULL, MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 10 /* 10s */, + MHD_OPTION_CONNECTION_LIMIT, + (unsigned int) CONNECTION_LIMIT, MHD_OPTION_END); if (NULL == mhd) {