[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] libmicrohttpd Digest, Vol 88, Issue 9
From: |
Yong Li |
Subject: |
Re: [libmicrohttpd] libmicrohttpd Digest, Vol 88, Issue 9 |
Date: |
Fri, 12 Aug 2016 13:06:41 +0800 |
Thanks for your mail!
I am using the curl command tool to test the http server, the options
are -H "Connection: close" -H "Content-Type: application/json" -H
"accept: application/json" -X POST
I increased the MHD_OPTION_CONNECTION_LIMIT to 2. However, the "Server
reached connection limit' still exists after two concurrent
connections. For easy test, I add sleep(4) in the
MHD_AccessHandlerCallback function. Then send two times http post
request usng the curl. Since the limit = 2, bofh them are accepted,
and curl can receive response.
On the 3rd curl run, the server reports "Server reached connection
limit", and the current connections are 2! It seems that it does not
cleanup the connections even after the connection is finished.
After the "Server reached connection limit" error, libmicrohttpd
performs the cleanup, and the fourth curl command is okay.
I am still thinking there is one MHD_cleanup_connections call is missing.
Thanks,
Yong
> Message: 6
> Date: Fri, 12 Aug 2016 00:45:46 +0300
> From: Evgeny Grin <address@hidden>
> To: libmicrohttpd development and user mailinglist
> <address@hidden>
> Subject: Re: [libmicrohttpd] MHD_OPTION_CONNECTION_LIMIT=1 issue
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset="utf-8"
>
> If you are using "Connection: keep-alive" (default for HTTP/1.1) then
> connection will stay active until client disconnect (if you are using
> web-browser as client, just close corresponding tab).
> Or set connection timeout in MHD.
>
> --
> Best Wishes,
> Evgeny Grin
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [libmicrohttpd] libmicrohttpd Digest, Vol 88, Issue 9,
Yong Li <=