The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

apache high memory usage

Discussion in 'EasyApache' started by andrei, Oct 1, 2013.

  1. andrei

    andrei Member

    Jun 1, 2011
    Likes Received:
    Trophy Points:

    I have a problem with an apache server: I have a VPS with CentOS 5.9 installed. I have installed cpanel vps and through him I installed Apache 2.4 and PHP 5.4.

    The problem is: if I use a simple php script to upload files and I upload a 800 mb, all free memory on the server is consumed for several minutes and then returns to normal and the scrip ended with error Failed to write file to disk (php Return Code: 7).

    I have limited PHP to 64MB and I use the "memory_get_usage" to see exactly how consuming and the result was less than 1 mb. I have set apache RLimitMEM limited to 80 MB but it did not work

    Can you help me how can I limit apache / php that you do not consume more than ex. 200 mb?

    Thanks a lot
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    You mentioned attempting to upload a file that is 800MB. Is that accurate? If so, you should keep in mind that uploading files that large should typically occur through FTP instead of a PHP script to avoid memory restrictions.

    Thank you.

Share This Page