Re: mod_fcgi: Excessive memory usage when large files are uploaded

2017-01-19 Thread Ivan Zahariev
Hello, It turns out that there is an existing bug report for this since year 2011: https://bz.apache.org/bugzilla/show_bug.cgi?id=51747 The latest proposed patch by Jan Stürtz on 2015-08-28 fixes both the Linux and Windows versions and still applies OK. Furthermore,

Re: mod_fcgi: Excessive memory usage when large files are uploaded

2017-01-17 Thread Jim Jagielski
> On Jan 17, 2017, at 6:03 AM, Yann Ylavic wrote: > > On Tue, Jan 17, 2017 at 9:06 AM, Ivan Zahariev wrote: >> >> 1. Delete each bucket after sending it to the "ipc_handle". I've looked >> through >> the call tree and the *output_brigade is last used

Re: mod_fcgi: Excessive memory usage when large files are uploaded

2017-01-17 Thread Ivan Zahariev
Hi, Here is the patch -- https://github.com/famzah/mod_fcgid/commit/84c7c2dbf2047745c6aea87a4bc6b4061c98ac8e A few notes: I tested it with several files which had random data and various lengths: 0b, 127b, 128b, 129b, 150MB, 1MB, 1b, 250MB, 350MB,

Re: mod_fcgi: Excessive memory usage when large files are uploaded

2017-01-17 Thread Yann Ylavic
On Tue, Jan 17, 2017 at 9:06 AM, Ivan Zahariev wrote: > > 1. Delete each bucket after sending it to the "ipc_handle". I've looked > through > the call tree and the *output_brigade is last used by proc_write_ipc(). > Therefore, it should be safe to empty it while being

mod_fcgi: Excessive memory usage when large files are uploaded

2017-01-17 Thread Ivan Zahariev
Hello, If a large amount of data is POST'ed to a process running mod_fcgid, the Apache child uses an excessive amount of memory when processing it. The client request is properly received and the following statement from the documentation is true: "Once the amount of request body read from