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.

PHP memory limit issue

Discussion in 'General Discussion' started by kenashkov, Jul 18, 2012.

  1. kenashkov

    kenashkov Active Member

    Joined:
    Nov 23, 2006
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Sofia, Bulgaria
    cPanel Access Level:
    Root Administrator
    Hi,

    It seems we are unable to set properly the memory limit for php.
    In the master php.ini file we have memory_limit set to 2048M. But when a script is executed it runs out of memory at 341MB.
    We are running php through suPHP - in this case the apache RLimitMEM should not affect it I presume? RLimitMEM is set to 550MB.
    We have disabled the background process killer as well... What else can affect the available php memory?

    Thank you
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    suPHP is restricted by Apache RLimitMEM and RLimitCPU settings. It is FCGI that isn't limited by these. If you have Apache RLimits set, try commenting them out of /usr/local/apache/conf/httpd.conf temporarily and restart Apache to see the results.

    If that does correct the issue, try bumping up the value and then distill the changes and restart Apache again:

    Code:
    /usr/local/cpanel/bin/apache_conf_distiller --update
    /etc/init.d/httpd restart
     
  3. kenashkov

    kenashkov Active Member

    Joined:
    Nov 23, 2006
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Sofia, Bulgaria
    cPanel Access Level:
    Root Administrator
    So it is affected by the RLimit. We have updated the value there manually...
    The general solution though is to move the site to a server with a lot more memory..
    Thank you.
     
Loading...

Share This Page