journal-remote: increase memory limit per connection to avoid errors with HTTPS
authorDongsu Park <dongsu@endocode.com>
Wed, 21 Oct 2015 12:51:10 +0000 (14:51 +0200)
committerDongsu Park <dongsu@endocode.com>
Fri, 30 Oct 2015 14:12:48 +0000 (15:12 +0100)
commit5e3efccfc97c521107057ab088f58acfae8a8956
treea8be132bbfaea42d9d7e15bc539a82625f472e2e
parentcb2266f9312a12d7e80c688bf31a9d4b148d5ce6
journal-remote: increase memory limit per connection to avoid errors with HTTPS

Explicitly set MHD_OPTION_CONNECTION_MEMORY_LIMIT to a larger value,
when setting up microhttpd, to give more memory per HTTP(S) connection.

This way systemd-journal-remote can now prevent microhttpd from failing
in creating response headers with messages like "Not enough memory for
write", especially when lots of HTTPS requests arrive. That's precisely
because MHD_OPTION_CONNECTION_MEMORY_LIMIT in libmicrohttpd defaults to
32768, which is in practice insufficient in this case.
See also https://gnunet.org/bugs/view.php?id=4007 for more details.

Fixes: https://github.com/coreos/bugs/issues/927
src/journal-remote/journal-remote.c