PHP Fatal error: Allowed memory size exhausted

Created on 20 January 2022, over 2 years ago
Updated 25 April 2024, 2 months ago

Problem/Motivation

When cloning a node with several paragraphs, I get a status 500.

In the PHP Log, I get the following:

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted.

Followed by

[20-Jan-2022 08:43:08 Europe/Brussels] PHP Stack trace:
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 1. {main}() D:\CustomDev\Pantheon\socmut-d9\web\index.php:0
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 2. Drupal\Core\DrupalKernel->handle($request = *uninitialized*, $type = *uninitialized*, $catch = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\web\index.php:19
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 3. Stack\StackedHttpKernel->handle($request = *uninitialized*, $type = *uninitialized*, $catch = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\DrupalKernel.php:708
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 4. Drupal\Core\StackMiddleware\NegotiationMiddleware->handle($request = *uninitialized*, $type = *uninitialized*, $catch = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\vendor\stack\builder\src\Stack\StackedHttpKernel.php:23
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 5. Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle($request = *uninitialized*, $type = *uninitialized*, $catch = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php:51
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 6. Drupal\Core\StackMiddleware\KernelPreHandle->handle($request = *uninitialized*, $type = *uninitialized*, $catch = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php:48
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 7. Drupal\Core\StackMiddleware\Session->handle($request = *uninitialized*, $type = *uninitialized*, $catch = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php:48
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 8. Symfony\Component\HttpKernel\HttpKernel->handle($request = *uninitialized*, $type = *uninitialized*, $catch = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\StackMiddleware\Session.php:58
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 9. Symfony\Component\HttpKernel\HttpKernel->handleRaw($request = *uninitialized*, $type = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\vendor\symfony\http-kernel\HttpKernel.php:80
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 10. Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure:D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php:96-98}() D:\CustomDev\Pantheon\socmut-d9\vendor\symfony\http-kernel\HttpKernel.php:158
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 11. Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext($controller = *uninitialized*, $arguments = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php:97
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 12. Drupal\Core\Render\Renderer->executeInRenderContext($context = *uninitialized*, $callable = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php:124
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 13. Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure:D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php:121-124}() D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\Render\Renderer.php:564
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 14. call_user_func_array:{D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php:123}(*uninitialized*, *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php:123
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 15. Drupal\Core\Controller\HtmlFormController->getContentResult($request = *uninitialized*, $route_match = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php:123
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 16. Drupal\Core\Form\FormBuilder->buildForm($form_arg = *uninitialized*, $form_state = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\Controller\FormController.php:73
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 17. Drupal\Core\Form\FormBuilder->processForm($form_id = *uninitialized*, $form = *uninitialized*, $form_state = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\Form\FormBuilder.php:320
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 18. Drupal\Core\Form\FormBuilder->doBuildForm($form_id = *uninitialized*, $element = *uninitialized*, $form_state = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\Form\FormBuilder.php:574
[20-Jan-2022 08:43:08 Europe/Brussels] PHP 19. Drupal\Core\Form\FormBuilder->doBuildForm($form_id = *uninitialized*, $element = *uninitialized*, $form_state = *uninitialized*) D:\CustomDev\Pantheon\socmut-d9\web\core\lib\Drupal\Core\Form\FormBuilder.php:1070

Where the last line is repeated more than 100 times.

Steps to reproduce

  1. Create a content type with paragraphs (The paragraph type also has entity references to other nodes)
  2. Create a node
  3. Clone the node

πŸ› Bug report
Status

Closed: duplicate

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium FreMun

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States webdrips

    Same issue here; I think the cloning process might need to be done in a batch to avoid the issue.

    However, the form to configure the clone is the one that's having the issue.

  • πŸ‡³πŸ‡±Netherlands Drumanuel

    Same here

  • πŸ‡ΊπŸ‡¦Ukraine max-kuzomko

    I'm experiencing the same issue.

  • πŸ‡ΊπŸ‡ΈUnited States seanr

    I'm seeing this as well. In our case, we've got fairly complex nodes with paragraphs attached and the like, so I'd certainly expect to see performance issues. The batch suggestion is an interesting one, but like webdrips, I don't get that far. The problem appears to me to be handling of nested entities. One a node that I can clone, this is what I end up getting in the UI:

    That is obviously quite unmanageable, even just from a UX perspective. Unfortunately, I don't have any good suggestions for how to deal with this.

  • Status changed to Closed: duplicate 2 months ago
  • πŸ‡ΊπŸ‡ΈUnited States seanr

    This actually looks like a duplicate of this one: #3010626 - marking as such.

Production build 0.69.0 2024