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 not Respected...?

Discussion in 'General Discussion' started by Phylum, Jul 9, 2011.

  1. Phylum

    Phylum Active Member

    Joined:
    Apr 20, 2010
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    One of my clients is using SlideShowPro and after creating an album with 1400 photos this started happening.

    When he clicks the album tab it loads, but after a refresh or cycle off to another tab and then back it just shows a white page. Here is the apache error log. I increased the php mem limit to 256, 512 and 768 just to see what would happen but no change.


    [Sat Jul 02 15:26:35 2011] [error] [client 98.204.128.120] , referer: http://site/sspd/index.php?/albums
    [Sat Jul 02 15:26:35 2011] [error] [client 98.204.128.120] Fatal error: , referer: http://site/sspd/index.php?/albums
    [Sat Jul 02 15:26:35 2011] [error] [client 98.204.128.120] Out of memory (allocated 12582912) (tried to allocate 51201 bytes), referer: http://site/sspd/index.php?/albums
    [Sat Jul 02 15:26:35 2011] [error] [client 98.204.128.120] in /path/to/site/sspd/app/cake/basics.php on line 261, referer: http://site/sspd/index.php?/albums

    It looks like the memory limit settings are not working, as that is failing at only 12M of memory. System Info reports the following on memory_limit:
    Memory limit 512MB
    Metadata EXIF and IPTC metadata parsing supported.
    File uploading Uploading enabled. Maximum file size is 105MB

    I temporarily re-enabled the phpinfo() function and it correctly reports the sizes I but it looks like there is a global limit on the memory_limit that is trumping the setting. I made the changes in WHM and saw that php.ini is was modified, which should be global - would it be an apache override?
    Something is overriding it somewhere, as the error clearly states that it is being cut off right at 12MB. I'm afraid I don't know exactly where that would be happening, but it could be in apache somewhere.

    The SlideShowPro vendor is pointing to a system [configuration(?)] issue but as far as me and the client are concerned, everything looks right.

    Thoughts?
     
  2. Phylum

    Phylum Active Member

    Joined:
    Apr 20, 2010
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Is this ticket worthy?
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You may want to try increasing the "post_max_size" value in your php.ini file. It's possible this is contributing to the error message.

    Feel free to submit a ticket if you would like our staff to investigate further:

    Submit A Ticket

    Thank you.
     
  4. 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
    It may not be the php.ini value but RLimitMEM in /usr/local/apache/conf/httpd.conf file. You can do a search for that value:

    Code:
    grep -i rlimit /usr/local/apache/conf/httpd.conf
    If you get a return, try commenting out the RLimitMEM with # at the beginning of that line in httpd.conf and restarting at that point. If the site then does work properly, you can remove or increase RLimitMEM in httpd.conf and then you need to run these commands to copy a backup, redistill, rebuild and restart Apache for the changes to take effect:

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak110712
    /usr/local/cpanel/bin/apache_conf_distiller --update
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
     
  5. Phylum

    Phylum Active Member

    Joined:
    Apr 20, 2010
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Good afternoon/evening all and thank you so much for taking the time to respond.

    post_max_size was initially set at something fairly high, but I since set it to 128 with no change.

    I ran what you suggested...
    Code:
    #grep -i rlimit /usr/local/apache/conf/httpd.conf
    RLimitMEM 235608064
    RLimitCPU 240
    ServerLimit 256
    
    I commented out the RLimit line(s?), restarted apache & am awaiting results.
     
Loading...

Share This Page