Apache2 memory usage when uploading large files

Posted by abhaga on Server Fault See other posts from Server Fault or by abhaga
Published on 2010-06-02T08:39:49Z Indexed on 2010/06/02 8:44 UTC
Read the original article Hit count: 328

Filed under:
|
|

Hi,

I am running apache2.2.12 along with PHP 5.2.10. PHP is configured to run as a separate process through fcgid. The problem is that when users upload a file, size of the apache process swells by almost the same amount. So if somebody tries to upload a 200 MB file, one of the child process swells to current size+200 MB. If 2 users simultaneously start uploading, my server crashes.

Now it is the virtual memory size which is increasing but since I am on a OpenVZ based VPS, that is what counts.

My questions are:

  • Is it the normal Apache behavior or can I do something to fix this?
  • If not, is there a more memory efficient way of handling big file uploads. Going by the current behavior, I will need 1 GB of free RAM for every apache child accepting a upload.

Thanks!

Abhaya

-

© Server Fault or respective owner

Related posts about php

Related posts about memory