We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14617
    • 47 Posts
    Hi all

    I get this error:

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 49651 bytes) in /hsphere/local/home/lundsholm2/3manager.com/manager/processors/cache_sync.class.processor.php on line 44 


    on all Saves (saving a resource, saving configuration, etc.). phpinfo() says my memory_limit is 128MB which should be plenty. I’m running the latest version from the SVN after getting the same error on the "official" 1.0.2.

    Any help is greatly appreciated.

    Regards
    Jonas
      • 14617
      • 47 Posts
      I have just discovered that the problem goes away when disabling friendly urls...
        • 14617
        • 47 Posts
        I found the problem! 2 entries in site_content were referencing each other as parent. Removing one allowed me to reenable friendly urls without problems.

        How 2 pages can start referencing each other i don’t know, though.

        Is this a bug?
        • I can’t imagine how that would have happened. What kind of work were you doing in the manager just before this started happening?
            Mike Schell
            Lead Developer, MODX Cloud
            Email: [email protected]
            GitHub: https://github.com/netProphET/
            Twitter: @mkschell
            • 14617
            • 47 Posts
            It was a client of mine who had just learned how to add, edit and move pages. He says, that right before this happend he was moving some pages around...
              • 14951
              • 151 Posts
              I’m having a very similar error, and a similar cause. Perhaps this bit of info can help narrow down a solution.

              The exact error I’m getting is:
              Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 491520 bytes) in /home1/westpos0/public_html/manager/includes/document.parser.class.inc.php(770) : eval()'d code on line 861


              I stumbled upon this when creating a landing page for my Ditto Blog Tags. The landing page contains the same ditto call as my blog. If the landing page is a child of my blog container I receive the previously mentioned error. As long as the landing page is anything but a child, I’m error free. This kind of bothers me since it ruins my breadcrumb navigation to have the landing page anywhere other than as a child of my blog.

              Hopefully this helps someone narrow down what might be the issue!

              Thanks!
              -Jared
              • @jtech:

                Your problem is your memory_limit is set to 32Mb and your Ditto call is simply using more memory than that. Increase your memory_limit or you’ll have to find a more efficient solution for your requirements than Ditto can provide. Without knowing more about your Ditto calls and Ditto itself, I don’t know why it only occurs if you make the Resource a child.

                FWIW, this has nothing to do with the OP’s problem, which has to do with Resource’s referencing each other as parents; this causes an infinite loop situation in which execution stops when memory_limit is exhausted.
                • I just had this issue too. I think our cause was a script we used to publish documents from another site through the API.

                  Anyway, I made this script to search for the documents which cause the problem:
                  $allDocs = mysql_query("SELECT id, parent FROM modx_site_content ORDER BY id DESC");
                  while($doc = mysql_fetch_assoc($allDocs)) {
                  	$parent = mysql_query("SELECT id FROM modx_site_content WHERE parent = " . $doc['id'] . " AND id = " . $doc['parent']);
                  	if(mysql_num_rows($parent)) {
                  		while($parentDoc = mysql_fetch_assoc($parent)) {
                  			echo 'Infinte loop found<br /><br />';
                  			echo 'Document #' . $doc['id'] . ' and document #' . $parentDoc['id'] . ' are eachothers parent.';
                  		}
                  	}
                  }
                  
                    Sterc Internet & Marketing | MODX Founding Partner | Chairman of the MODX Advisory Board

                    In need of a MODX consult? Try our MODX Developers Experts!
                    • 6535
                    • 2 Posts
                    Hi,

                    I realise this is an old post but I had exactly the same issue.

                    Within the manager I am able to have two resources (a parent and a child). I can then change the parent resource of the parent to be the child thus creating a loop. The resources are both parents of each other and children of each other.

                    I did this from a standard Edit Resource page by clicking on on the Parent Resource dropdown and picking it’s child node from the tree on the left.

                    The saving dialog box then appears and never goes away whilst in the background mysql crashes. The front end then gets the fatal error and the manager too if you try and expand the resource tree. The update made it to the database.

                    Is there validation to stop this happening and if there is how could I be skipping it?

                    Environment: Revolution 2.0.7 traditional, Mac OSX 10.6.2, PHP 5.2.9, MySQL 5.1.33 running on XAMPP 1.0.1, PDO enabled, Firefox 3.6.18

                    Thanks for any help.
                    • There is definitely validation in place to prevent this, but if you could offer details on how you are changing the parent to it’s own child, we’d love to get it fixed...