Hi Christian, I'm using following options, single threaded external epoll: auto mhdDaemon = MHD_start_daemon (MHD_USE_EPOLL | MHD_ALLOW_SUSPEND_RESUME | MHD_USE_ERROR_LOG | *MHD_USE_TURB*O | MHD_USE_DEBUG, 0, NULL, NULL, &Server::httpServerAccessHandlerCb, this, MHD_OPTION_SOCK_ADDR, &addr, MHD_OPTION_CONNECTION_TIMEOUT, MHD_DEF_CONN_TIMEOUT, MHD_OPTION_CONNECTION_LIMIT, maxConcrrntConn, MHD_OPTION_EXTERNAL_LOGGER, &Server::httpServerErrorHandler, this, MHD_OPTION_NOTIFY_COMPLETED, &Server::httpServerRequestCompleted, this, MHD_OPTION_END);
Observing that MHD is not processing the upload data for *few(other request are successfully completed) *of the requests when there is data associated with it. e.g PUT/GET/DELETE with data < approx 2KB. logs for ref: httpServerRequestCompleted:940: Request complete on txn:3522 termCode:0\"} httpServerAccessHandlerCb:653: Incoming req, inserting txnId:3523 in map\"} -- new request httpServerAccessHandlerCb:671: Incoming req, upload data size:1607\"} httpServerRequestCompleted:940: Request complete on txn:3523 termCode:5\"} -- doesn't process the uploaded data eventually error when client(libcurl) times out. httpServerAccessHandlerCb:653: Incoming req, inserting txnId:3524 in map\"}\ Do you see any issue ? Regards, Kunal On Sun, Sep 9, 2018 at 4:02 PM Christian Grothoff <groth...@gnunet.org> wrote: > On 09/06/2018 08:19 AM, Kunal Ekawde wrote: > > > > Can you please provide some information on 'MHD_USE_TURBO' as I couldn't > > find any info in manual. > > From the manual: > > @item MHD_USE_TURBO > @cindex performance > Enable optimizations to aggressively improve performance. > > Currently, the optimizations this option enables are based on > opportunistic reads and writes. Bascially, MHD will simply try to > read or write or accept on a socket before checking that the socket is > ready for IO using the event loop mechanism. As the sockets are > non-blocking, this may fail (at a loss of performance), but generally > MHD does this in situations where the operation is likely to succeed, > in which case performance is improved. Setting the flag should generally > be safe (even though the code is slightly more experimental). You may > want to benchmark your application to see if this makes any difference > for you. > > > -- ~Kunal