Fatal error: Allowed memory size of

Hi There.

I’ve installed a size from dev to live, on the same server, but I’m getting a strange error - only for anonymous users. If the user is logged in, there’s no error.


Fatal error: Allowed memory size of 52428800 bytes exhausted (tried to allocate 4096 bytes) in /home/site/public_html/core/cache/resource/web/resources/1.cache.php on line 3376

Fatal error: Allowed memory size of 52428800 bytes exhausted (tried to allocate 20480 bytes) in /home/site/public_html/core/vendor/xpdo/xpdo/src/xPDO/Om/xPDOCriteria.php on line 98

Why would there be a memory issue for anonymous users only?
I have several resource/user groups - could it be a permissions thing?

Any ideas?

Do anonymous users have the permissions to access the page with the ID = 1?

It could be, that if they don’t have permission, MODX tries to redirect to the unauthorized_page. But if unauthorized_page is set to 1 it will create a loop that could result in a memory issue.

If that is not the issue, could you check what gets executed in that file on the specified line?

That’s a very good point. As you know from previous posts - I’m RUBBISH at the resource groups/permissions side of things!!

So the home page is part of the Resource Group: Non News Pages

Within the Anonymous Users & Groups, under the resource group tab, I have:
Non News Pages member-9999 Load Only web
Under the Contexts tab i have:

Web member-9999 Load Only

Could other User Groups be kicking out the Anonymous Users?

If this resource group it just to restrict access to some resources in the manager (context = “mgr”) and not to restrict access to these resources in the frontend (context = “web”), then don’t add any rules with context = “web” to any user groups for this resource group.

If you want to restrict access in the frontend (context = “web”), then the user group needs at least the view permission to be able to see the page.

Harry. You are an absolute Legend!!!
I thought I had to give web access from Each user group to each resource group so they could view the front end while logged in!

For some reason now, all the members of the Non News Pages cannot see anything in the resource tree - even though all pages are connected to that resource group.

So are you talking about the manager (context = “mgr”) now?
Does the user group have the load and list permissions for this resource group in the “mgr” context?

Sorry yes the manager context.

The User group called AdminLite (which all editors are a member of) has the follow settings:

Under Context tab:

Context:   Min Role:      Access policy
mgr        Editor - 10    AdminLite

Under Resource Groups Tab:

  Non News Pages         Editor - 10          Resource       mgr

Does this look good?

So - I just tried added the context of web to the Usergroup:

Web        member - 9999            Load List and View

And this seems to work now - I can see all the resources in the resource tree again.

The trouble is that I keep getting things to work eventually, but I still don’t understand why, so hard to learn from it!