Re: [libmicrohttpd] Server reached connection limit. Closing inbound connection. how to increase the limits?

2018-01-22 Thread Evgeny Grin
In addition, consider using MHD_OPTION_CONNECTION_TIMEOUT so old connection will be dropped automatically. -- Best Wishes,Evgeny Grin   20.01.2018, 20:53, "Christian Grothoff" :Hi Pascal,There are several "limits" that may apply.(1) MHD_OPTION_CONNECTION_LIMIT -- usually 1020 (or FD_SETSIZE - 4) is

Re: [libmicrohttpd] Unable to connect to libmicrohttpd in embedded system.

2018-01-22 Thread Evgeny Grin
Hi Marcel, Why do you think that you have some race condition? You are using single thread, unlikely it could produce any internal race condition. With recent versions of MHD, I suggest to use MHD_USE_AUTO. In your case it could be MHD_USE_AUTO | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG c

Re: [libmicrohttpd] Unable to connect to libmicrohttpd in embedded system.

2018-01-22 Thread Marcel Rutten
Thanks, Evgeny, My statement was a bit off. The race condition is not inside MHD_epoll() and its cousins, but in the loop surrounding them. So I get an incessant series of calls to e.g., MHD_epoll() at a very high rate, without anything actually happening. I have landed inside MHD_accept_connecti

Re: [libmicrohttpd] Unable to connect to libmicrohttpd in embedded system.

2018-01-22 Thread Marcel Rutten
Found it. accept4() returns an invalid socket. I will carry on tomorrow, it's almost midnight in my time zone ... On 22 January 2018 at 23:13, Marcel Rutten wrote: > Thanks, Evgeny, > > My statement was a bit off. The race condition is not inside MHD_epoll() > and its cousins, but in the loop su

Re: [libmicrohttpd] Unable to connect to libmicrohttpd in embedded system.

2018-01-22 Thread Christian Grothoff
-1 can be *normal*, as MHD calls 'accept()' (possibly via multiple threads when using a thread pool) until there are no more clients. You should check what errno says. Also, in case accept4() is buggy on your platform, it is an optimization; so you could #undef HAVE_ACCEPT4 if accept() + setsocko

Re: [libmicrohttpd] Unable to connect to libmicrohttpd in embedded system.

2018-01-22 Thread silvioprog
Hello Marcel, sorry for the late answer. The primary example was deleted from my old machine, but I downloaded the new Android Studio version and created a new example using MHD 0.9.58 as static library. This new example is very, very, very simple, no sophisticated implementation, just an app with