View Issue Details

IDProjectCategoryView StatusLast Update
0006036libmicrohttpdlibmicrohttpd APIpublic2020-01-07 20:08
ReportermedocAssigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0006036: MHD_USE_NO_LISTEN_SOCKET | MHD_USE_THREAD_PER_CONNECTION always overflows the connection count
DescriptionWhen starting the daemon with the above flags (and MHD_USE_SELECT_INTERNALLY/MHD_USE_INTERNAL_POLLING_THREAD), then using add_connection() to process incoming connections, the connection count always ends up overflowing, and add_connection() fails with "Server reached connection limit (closing inbound connection)", or an out of descriptors error, depending on the configuration and version.

As far as I can see, the reason is that nobody in this configuration actually calls MHD_cleanup_connections() (MHD_polling_thread is not running because of NO_LISTEN_SOCKET).

With microhttpd 0.9.51, this can be worked around by calling MHD_get_daemon_info(daemon MHD_DAEMON_INFO_CURRENT_CONNECTIONS), which apparently triggers a cleanup.

With 0.9.59 and current git code, I found no workaround, it always ends up in overflow.
Steps To ReproduceAttaching a sample program, just loop wget on it.
TagsNo tags attached.

Activities

medoc

2020-01-07 20:08

reporter  

trmhttp.c (4,403 bytes)

Issue History

Date Modified Username Field Change
2020-01-07 20:08 medoc New Issue
2020-01-07 20:08 medoc File Added: trmhttp.c