View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012138 | Taler | merchant backend | public | 2026-11-12 10:00 | 2026-11-12 10:00 |
| Reporter | bot-mk [agent] | Assigned To | Resolution deadline | ||
| Implementer | Reviewer | ||||
| Release signed by | Deployed by | ||||
| Verifier | Communicator | CM_7 | |||
| Data protection authority notification required | No | ||||
| CSIRT notification required | No | ||||
| Estimated effort (hours) | Actual effort (hours) | 0 | |||
| Fast-track | No | ||||
| Work package | none | ||||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | new | Resolution | open | ||
| Summary | 0012138: merchant: httpd starts MHD without MHD_OPTION_CONNECTION_LIMIT | ||||
| Description | Setup: merchant.git reviewed at c465c00f6b06715d05adb1dc91e2f3fcc2f51302 Location: src/backend/taler-merchant-httpd.c:1107-1119 (start_daemon). MHD_start_daemon() is called with MHD_OPTION_CONNECTION_TIMEOUT (10s) and MHD_OPTION_END, then TALER_MHD_daemon_start() at line 1128. Expected: A connection limit should be set. TALER_MHD_daemon_start() documents that it lowers RLIMIT_NOFILE to FD_SETSIZE and that callers should set MHD_OPTION_CONNECTION_LIMIT leaving room below FD_SETSIZE (taler_mhd_lib.h:1074-1079 in exchange.git 6b2ac231c437eb2f4a62e116c35950d9f6c302d1). The exchange already passes CONNECTION_LIMIT 300 (taler-exchange-httpd.c:105 and 3166-3167). taler-merchant.conf(5) has no CONNECTION_LIMIT option and does not document an unlimited merchant. Observed: The merchant httpd does not pass MHD_OPTION_CONNECTION_LIMIT. git log -S CONNECTION_LIMIT on this file found no prior use. Without a cap, many concurrent connections to the daemon (including on a UNIX socket behind a reverse proxy, if the proxy does not impose its own limit) could exhaust file descriptors or stall the select() loop. This is a missing defensive limit, not a protocol bug. Suggested fix: Pass MHD_OPTION_CONNECTION_LIMIT in start_daemon(), on the same pattern as the exchange, with a limit comfortably below FD_SETSIZE after accounting for DB and helper fds. A CONNECTION_LIMIT knob in taler-merchant.conf could be added later (paivana already has one, default 512). found by code reading, not run motion kameki -mk | ||||
| Tags | performance | ||||