Does not appear to kick in when required

Created on 6 April 2023, over 1 year ago

Problem/Motivation

I have done a fresh install of v2.01.

My particular interest is in whacking up the available memory on certainly memory-hungry pages such as /admin/config/development/configuration so I have enabled the Route sub-module.

I have configured two routes for testing purposes with under a policy which requires 256M...

I have set the local PHP memory ceiling to 96M and this is evidenced on the /admin/reports/status page.

While I understand that the minimum recommended setting for Drupal 9 is 128M, I am able to visit my most demanding front end pages with it set to 96M so it seems like a valid test.

Does not appear to kick in

When I try to visit either of those two pages, I see the following error which suggests to me that the module is not kicking in as and when required?

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in <site>\core\lib\Drupal\Core\Cache\MemoryBackend.php on line 108

I have configured the module to 'Add memory information in response headers' 'though I don't really understand what that is for?

Any advice and ideas gratefully received

💬 Support request
Status

Closed: works as designed

Version

2.0

Component

Miscellaneous

Created by

🇬🇧United Kingdom SirClickALot Somerset

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @SirClickALot
  • 🇫🇷France vbouchet

    Hi,

    The "Add memory information in response headers" will provide informations that you can see when doing a right click > inspect and check the network tab. Refresh the page and check the headers of the response. It will tell you the memory, if it has been overridden by the module and if yes, which rules apply.

    However, in your case it will never fire for multiple reasons. First of all, you used the route plugin but you actually filled in path. The route name for /admin/people/permissions is user.admin_permissions and the route name for /admin/config/development/configuration is config.sync. If you want to fill path (which is probably easier), you should use the path plugin instead. Second, all the conditions of a policy must apply for the memory limit to be overridden. In your case, even if you use the path plugin instead, you can't be at the same time on /admin/config/development/configuration and /admin/people/permissions. Both route and patch plugins expose a textarea which allow to fill multiple routes or paths.

    I will create a task to validate the routes on submit.

    Let me know if it helps solving your issue.

  • 🇬🇧United Kingdom SirClickALot Somerset

    Ah, now I understand. thanks very much @vbouchet, that's very clear.

    I will continue to experiment.

  • Status changed to Closed: works as designed over 1 year ago
  • 🇫🇷France vbouchet

    Thanks for the very quick reply and happy it helped. I am closing the issue to keep the issue queue clean but if you need more support, feel free to reopen.

Production build 0.71.5 2024