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.

memory limit

Discussion in 'General Discussion' started by jozo, Jun 13, 2012.

  1. jozo

    jozo Registered

    Joined:
    Nov 11, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Dear,
    i read big 40MB XML file and get this error:

    my memory_limit in php.ini in folder is 4096M, and in tweak settings memory limit is 1512MB. Physical memory of server is 12GB.
    Where to find further restrictions?

    Thanks
     
  2. Hawky

    Hawky Member

    Joined:
    Oct 9, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Hi,

    is there any solution for this problem?
    I've the same error, I tried everything
    but nothing worked ... :(

    Thanks
     
  3. 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
    Check /usr/local/apache/conf/httpd.conf for the following:

    Code:
    grep -i rlimit /usr/local/apache/conf/httpd.conf
    If you do see the following set:

    RLimitMEM Value

    Where Value is a number after the directive, then comment out the line:

    Code:
    #RLimitMEM Value
    At that point, restart Apache:

    Code:
    /etc/init.d/httpd restart
    If the site works, then you'll need to remove or raise the value, distill Apache and restart it:

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

    Hawky Member

    Joined:
    Oct 9, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Hey Tristan,

    thank you for your help. I followed your tip with the following result:

    Server 1:

    There is a RLimitMEM Value in the httpd.conf
    I removed it, restart httpd, same failure!

    Server 2:
    There is no RLimitMEM entry in the httpd file.

    I tried the same script on a 4year old debian system, no problem, everything
    worked perfectly.

    I tried to increase every limitation I found, without success.

    What I try to do:

    1 - Open a 40MB XML File with 700 000 lines
    2 - Parse it with SimpleXML
    3 - Write data into MySQL

    The error already occures after step 1. With a 14MB File with 285 000 lines everything works.
    Code:
    <b>Warning</b>:  SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: (null)(null) /home/.../www/test.xml:238267: parser error : out of memory error in <b>/home/.../public_htm/.../import.php</b> on line <b>14</b><br />
    
    Stacktrace:
    Code:
    mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
    
    There must be a solution for this problem :-(

    Thank you,
    Hawky
     
    #4 Hawky, Oct 11, 2012
    Last edited: Oct 11, 2012
Loading...

Share This Page