donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit 79ab30e5f1e839e8e8d69f67737e6dfdcad97ea4
parent 4732a631de54c23b7e81be64b7a9b66cd497c5a4
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 15 Nov 2026 16:42:40 +0100

fix #12138

Diffstat:
Msrc/donau/donau-httpd.c | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/donau/donau-httpd.c b/src/donau/donau-httpd.c @@ -63,6 +63,15 @@ #define EXIT_NOTCONFIGURED 6 #endif +/** + * 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 donau-httpd + * processes sharing the listen socket (as high-performance setups do + * via systemd) take the connection. + */ +#define CONNECTION_LIMIT 300 /** * Backlog for listen operation on unix domain sockets. @@ -994,6 +1003,8 @@ start_daemon (void *cls, NULL, MHD_OPTION_CONNECTION_TIMEOUT, connection_timeout, + MHD_OPTION_CONNECTION_LIMIT, + (unsigned int) CONNECTION_LIMIT, (0 == allow_address_reuse) ? MHD_OPTION_END : MHD_OPTION_LISTENING_ADDRESS_REUSE,