libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] unexpected "Server reached connection limit." failur


From: Evgeny Grin
Subject: Re: [libmicrohttpd] unexpected "Server reached connection limit." failures
Date: Mon, 6 Dec 2021 10:52:34 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2

You can use MHD_OPTION_EXTERNAL_LOGGER with current API to get all information in your application. However it is human-readable data, more suitable for... log. :) This data was not designed to be parsed and error description may change from version to version.

For the next MHD version we can implement something similar to MHD_OPTION_NOTIFY_CONNECTION / MHD_NotifyConnectionCallback, but called for every connection error (socket connection error, socket recv()/send() errors, TLS error, wrong request error, application error etc.) Maybe this should be combined with the new logger callback which may integrate textual description with error codes and connection/daemon handles.
I'd like to know your ideas for such callback.


Let me know please when you finished testing of the new code.

--
Evgeny



On 06.12.2021 2:39, Frank Ch. Eigler wrote:

Evgeny Grin wrote:

Thanks for precise description and code analysis, Frank.
The issue (and a couple of connected issues) has been fixed in git master.

The rework looks good, thanks!

One other thing would be nice.  As it is, when these internal errors
occur, libmicrohttpd might send a diagnostic to stderr, but otherwise
the enclosing application has no way of knowing that this happened.
Would you consider keeping maybe daemon->error_count, or an errno log,
or something available, so an app could at least tell something is going
wrong?


Could you build MHD from git sources and check whether the issue is
fixed for you?

I'll do so shortly.

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]