httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: mod_fcgi: Excessive memory usage when large files are uploaded
Date Tue, 17 Jan 2017 16:06:34 GMT

> On Jan 17, 2017, at 6:03 AM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
> 
> On Tue, Jan 17, 2017 at 9:06 AM, Ivan Zahariev <famzah@famzah.net> 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 processed there.
>> 2. Take the same approach as mod_http2, which handles FILE buckets in a
>> different way. Instead of using apr_bucket_read(), they process FILE buckets
>> by apr_file_read() and manage the data buffer manually. This way the
>> original *output_brigade won't be modified and automatically split by
>> apr_bucket_read(). This requires more coding work.
> 
> I would go for 1., but keep in mind that you can't delete the bucket
> while it is still pointed to by the iovec...
> 

+1


Mime
View raw message