summaryrefslogtreecommitdiff
path: root/debuginfod
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2022-04-24 12:16:58 +0200
committerMark Wielaard <mark@klomp.org>2022-04-24 12:16:58 +0200
commit3bcf887340fd47d0d8a3671cc45abe2989d1fd6c (patch)
tree817ce179bde6f156d01b7e8af1813dd5f335a103 /debuginfod
parent318807e7f968fd70b80408e3df029c04365c47d8 (diff)
downloadelfutils-3bcf887340fd47d0d8a3671cc45abe2989d1fd6c.tar.gz
debuginfod: Use MHD_USE_ITC in MHD_start_daemon flags
This prevents the "Server reached connection limit. Closing inbound connection." issue we have been seeing in the run-debuginfod-webapi-concurrency.sh testcase. From the manual: If the connection limit is reached, MHD’s behavior depends a bit on other options. If MHD_USE_ITC was given, MHD will stop accepting connections on the listen socket. This will cause the operating system to queue connections (up to the listen() limit) above the connection limit. Those connections will be held until MHD is done processing at least one of the active connections. If MHD_USE_ITC is not set, then MHD will continue to accept() and immediately close() these connections. https://sourceware.org/bugzilla/show_bug.cgi?id=28708 Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'debuginfod')
-rw-r--r--debuginfod/ChangeLog4
-rw-r--r--debuginfod/debuginfod.cxx3
2 files changed, 7 insertions, 0 deletions
diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog
index d6f7b282..0f1bca6f 100644
--- a/debuginfod/ChangeLog
+++ b/debuginfod/ChangeLog
@@ -1,3 +1,7 @@
+2022-04-24 Mark Wielaard <mark@klomp.org>
+
+ * debuginfod.cxx (main): Add MHD_USE_ITC to MHD_start_daemon flags.
+
2022-04-13 Aaron Merey <amerey@redhat.com>
* debuginfod-client.c (debuginfod_query_server):
diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
index 9c0217f6..adca8208 100644
--- a/debuginfod/debuginfod.cxx
+++ b/debuginfod/debuginfod.cxx
@@ -3910,6 +3910,9 @@ main (int argc, char *argv[])
| MHD_USE_EPOLL
#endif
| MHD_USE_DUAL_STACK
+#if MHD_VERSION >= 0x00095200
+ | MHD_USE_ITC
+#endif
| MHD_USE_DEBUG, /* report errors to stderr */
http_port,
NULL, NULL, /* default accept policy */