From 8c6bcbf892c60ec33292dd3a912f03f36b27be27 Mon Sep 17 00:00:00 2001 From: Klearchos Chaloulos Date: Thu, 4 Feb 2016 17:35:24 +0200 Subject: journal-remote: decrease microhttpd memory limit Set the MHD_OPTION_CONNECTION_MEMORY_LIMIT to 128KB. The precious value was DATA_SIZE_MAX, which was defined as 1024*1024*768. This caused journal-remote to allocate 756MB for each journal-upload connection, thus exhausting the available memory. --- src/journal-remote/journal-remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/journal-remote') diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c index cfe111fd91..fa4a4ff931 100644 --- a/src/journal-remote/journal-remote.c +++ b/src/journal-remote/journal-remote.c @@ -645,7 +645,7 @@ static int setup_microhttpd_server(RemoteServer *s, { MHD_OPTION_NOTIFY_COMPLETED, (intptr_t) request_meta_free}, { MHD_OPTION_EXTERNAL_LOGGER, (intptr_t) microhttpd_logger}, { MHD_OPTION_LISTEN_SOCKET, fd}, - { MHD_OPTION_CONNECTION_MEMORY_LIMIT, DATA_SIZE_MAX}, + { MHD_OPTION_CONNECTION_MEMORY_LIMIT, 128*1024}, { MHD_OPTION_END}, { MHD_OPTION_END}, { MHD_OPTION_END}, -- cgit v1.2.3-54-g00ecf