Bug 51749 - mod_fcgid uses memory proportional to request size, even when beyond fcgidmaxrequestinmem
Summary: mod_fcgid uses memory proportional to request size, even when beyond fcgidmax...
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_fcgid (show other bugs)
Version: 2.2.19
Hardware: PC Linux
: P2 critical with 6 votes (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2011-09-01 10:46 UTC by Dominic Benson
Modified: 2013-02-27 07:44 UTC (History)
2 users (show)



Attachments
Move read buckets from request to a temp brigade and periodically clean (4.03 KB, patch)
2011-09-01 10:46 UTC, Dominic Benson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominic Benson 2011-09-01 10:46:19 UTC
Created attachment 27449 [details]
Move read buckets from request to a temp brigade and periodically clean

See also bug 51747.

input_brigade handling doesn't remove buckets as it reads them, so although the request data gets written to the temp file, the buckets themselves don't appear to be freed. This causes memory usage to rise while the request is sent as approx. received length / 3.

The attached patch moves buckets from the input brigade into a temporary brigade as they are received, and periodically cleans this temporary brigade after the data has been stored.

Observed with mod_fcgid 2.3.6 and httpd 2.2.19
Comment 1 William A. Rowe Jr. 2012-01-20 22:10:14 UTC
Committed, targeting 2.3.7 release.  Thanks!
Comment 2 Christophe JAILLET 2013-02-27 07:44:46 UTC
2.3.7 released on 2012-04-23.