[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] MHD_OPTION_CONNECTION_LIMIT=1 issue
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] MHD_OPTION_CONNECTION_LIMIT=1 issue |
Date: |
Thu, 11 Aug 2016 16:00:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 |
Hi Yong,
MHD would clean up the previous connection, but in your case that
probably simply doesn't happen in time for the 2nd request to be
accepted. Setting the limit to 1 is _very_ low in almost all cases,
and if you do so, you should expect connections to fail unless you
really only have 1 client occasionally sending 1 request.
Happy hacking!
Christian
On 08/11/2016 03:13 PM, Yong Li wrote:
> Hi All,
>
> I am testing libmicrohttpd 0.9.50, and I found If I use
> MHD_USE_THREAD_PER_CONNECTION and MHD_OPTION_CONNECTION_LIMIT=1
> options, the http server cannot accept curl connection on the second
> try. The first connection to the http server is okay, the second try
> failed with error message: Server reached connection limit (closing
> inbound connection)
>
> It seems that the MHD_cleanup_connections does not free the previous
> connection?
>
> Is it okay to set the MHD_OPTION_CONNECTION_LIMIT=1 ?
>
> Thanks,
> Yong
>
0xE29FC3CC.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature