Summary: | Uploading a large file causes mod_fcgid to overuse memory and eventually crash | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Oz Gilat <ozgilat> |
Component: | mod_fcgid | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 2.5-HEAD | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: |
upload script
proposed patch |
Created attachment 34429 [details]
proposed patch
|
Created attachment 34428 [details] upload script Hi, When i'm uploading a large file (~270 MB) using the attached script (upload.php), mod_fcgid tries to send it to the PHP process and causes a crash in httpd.exe. The proc_write_ipc function gets the apr_bucket_brigade list and sends the buckets one by one to the PHP process and is using a lot of memory until a point where 'malloc' returns NULL (through allocator_alloc ) and httpd immediately crashes. I've attached a suggestion for a patch to this function where the httpd is using significantly less memory and the crash is gone. It basically frees each apr_bucket after it is sent to the php process. thanks!