We have started to experiment with running MHD with epoll + thread pool as
we do the FD limit in certain situations.  We understand that there are
caveats to this given that we have some blocking database calls.  This
seems to get us past the FD limit errors and the performance is similar.
 However, we are running into growing memory consumption in our server over
time running epoll+threads that require a restart frequently.   This does
not seem to occur with just epoll (without the thread pool).   We are
running jemalloc, but it does not seem to be related to the leak when it is
disabled.  There is the following comment in the MHD code for the
MHD_pool_reallocate
function that might be connected to this issue:

/* Reallocate a block of memory obtained from the pool.

 * This is particularly efficient when growing or

 * shrinking the block that was last (re)allocated.

 * If the given block is not the most recently

 * (re)allocated block, the memory of the previous

 * allocation may be leaked until the pool is

 * destroyed or reset. */


Can anyone confirm whether this might be related?


ASAN does not seem to detect any issues in our code presently (not sure
about MHD)


Erik

Reply via email to