Results 1 to 4 of 4

Thread: memory limit

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    4

    Default memory limit

    Dear,
    i read big 40MB XML file and get this error:

    Warning: simplexml_load_file() [function.simplexml-load-file]: (null)(null)(null):35661: parser error : out of memory error in on line 246

    Warning: simplexml_load_file() [function.simplexml-load-file]: ImgSize="17841" Note="Brother - TZ-S641, žltá / čierna (18mm, extr. adhez.)" in on line 246

    Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in on line 246

    Warning: simplexml_load_file() [function.simplexml-load-file]: (null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null):35662: parser error : Extra content at the end of the document in on line 246

    Warning: simplexml_load_file() [function.simplexml-load-file]: <StoItem Id="193317" Code="584023" PartNo="2860B001" PartNo2="pcl kit" Name="C in on line 246

    Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in on line 246
    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. #2
    Registered User
    Join Date
    Oct 2012
    Posts
    4
    cPanel/WHM Access Level

    DataCenter Provider

    Default Re: memory limit

    Hi,

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

    Thanks

  3. #3
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: memory limit

    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
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  4. #4
    Registered User
    Join Date
    Oct 2012
    Posts
    4
    cPanel/WHM Access Level

    DataCenter Provider

    Default Re: memory limit

    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
    Last edited by Hawky; 10-11-2012 at 08:44 AM.

Similar Threads

  1. Memory Limit
    By JU5TY in forum New User Questions
    Replies: 2
    Last Post: 11-25-2011, 03:18 AM
  2. memory limit issue
    By hgrg in forum cPanel & WHM Discussions
    Replies: 6
    Last Post: 08-31-2011, 11:15 AM
  3. php memory limit
    By herbertjoei in forum New User Questions
    Replies: 13
    Last Post: 07-17-2007, 06:21 AM
  4. Memory Limit (experimental)
    By chris8lunch in forum cPanel & WHM Discussions
    Replies: 3
    Last Post: 11-07-2006, 05:53 AM
  5. php memory limit
    By futuron in forum cPanel & WHM Discussions
    Replies: 3
    Last Post: 01-02-2005, 11:06 PM