- Issue created by @Ryo Ichiyama
In seeking to reproduce this I got this at the last step:
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/docroot/modules/contrib/metatag/src/MetatagManager.php on line 289 Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in Unknown on line 0 Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in Unknown on line 0
Is it possible what you are seeing is this memory exhaustion?
By uninstalling metatag, the problem no longer occurs. Let's confirm that.
- π―π΅Japan Ryo Ichiyama
Thank you very much for your verification.
The error log of my Linux server did not contain any information related to the metatag module, but after uninstalling the metatag module, it started working normally!
For reference, the error log of the Linux server is as follows.
(70007)The timeout specified has expired: AH01075: Error dispatching request to : (polling), referer: https://MYDOMAIN/admin/webform/manage/MYURLALIAS/submission/980/edit
And as you can see in your log, the memory usage of Apache & PHP-FPM increases.
If this is not a problem with the Webform module, I will close this case. What do you think?
- πΊπΈUnited States DamienMcKenna NH, USA
Can you please confirm the version of Metatag that is being used, which Metatag submodules are being used, and whether you're also using Schema.org Metatag and its submodules?
Metatag 2.0.2 is the only metatag-related module installed on the site where memory exhausted.
- π―π΅Japan Ryo Ichiyama
Thanks for your reply.
I have the following modules installed on my site:
- Metatag 2.0.2
- Metatag: Mobile & UI Adjustments
Schema.org Metatag module is not installed.
- Status changed to Postponed: needs info
about 1 month ago 3:24pm 15 January 2025 - πΊπΈUnited States cindytwilliams Nashville, TN
This is happening for me as well when I upgrade metatag from version 1.26.0 => 2.1.0 and then edit a webform submission:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /var/www/web/modules/contrib/metatag/src/MetatagManager.php on line 289 Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in Unknown on line 0
- πΊπΈUnited States redeight
I've been trying to figure out this issue for a while now. I have confirmed that uninstalling Metatag fixes the issue I was having.
On to the weird.... I'm running some custom code that loads and modifies webform submissions. In my case, with metatag installed, it gets stuck in an infinite foreach loop.
Specifically on webform (version 6.2.9) /src/WebformSubmissionStorage.php line 1438.
foreach ($submissions_data as $sid => $submission_data) {
$submissions_data is an array and in my case only contains one element (a single webform submission's data). stepping through, it goes all the way through the interior of the foreach loop, then ends up back on the foreach line and sets $sid and $submission_data to the exact same values as last time, jumps into the interior and works through setting values that were already set. It does this without end until PHP runs out of memory or throws an exception for calling too many functions or something like that. In debugging I was able to set a breakpoint and forcibly set the $submissions_data array to be null after it ran through a couple times and that causes it to finally leave the foreach loop. Everything else then proceeds as expected.
Uninstalling the metatag module and running through the debugging breakpoint again hits the same foreach loop but DOESN'T get stuck....
I'm so far beyond my ability to understand what is happening here. If there is any information I can give that might help either Metatag or Webform developers fix this issue, I'm more than willing to keep plugging on this issue.
- π©πͺGermany butch.coolidge Reutlingen
We're experiencing the same problem here.
- Drupal 10.3
- Webform 6.2.9
- Metatag 2.1.0 (Submodules activated: Dublin Core + Advanced, Favicons, Mobile & UI, Open Graph, Views)
- Schema.org 3.0.3Editing Webform submissions works fine as long as there is no "Computed twig" or "Computed token" field in the webform.
Adding a "computed twig" field to the webform makes it impossible to edit the submission, even if the computed twig is something "easy" like
{% set a = 'test' %} {% if a == 1 %} asdf {% else %} xyz {% endif %}
so that it would return "xyz".
This "computed twig" returns the following error in our logfile:
AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in /var/www//modules/metatag/src/MetatagManager.php on line 289;Maybe there is a way to suppress the "computing" of this "computed twig" field on editing a submission?