Most exports exhaust memory

Created on 2 May 2025, 10 days ago
Updated 6 May 2025, 6 days ago

Problem/Motivation

We have this module installed on several sites in a Drupal multisite, and the module is not working correctly on one of our sites. I have tried exporting nodes and blocks of a variety of types, and most of the time this results in memory errors like so:

php-error acn [01-May-2025 13:12:37 America/New_York] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/docroot/core/includes/errors.inc on line 29 request_id="v-7835cc2c-26af-11f0-9699-ef74c8f7c1be"

php-error acn [01-May-2025 13:12:37 America/New_York] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /var/www/html/docroot/core/lib/Drupal/Core/Database/DatabaseExceptionWrapper.php on line 1 request_id="v-7835cc2c-26af-11f0-9699-ef74c8f7c1be"

php-error acn [01-May-2025 13:12:37 America/New_York] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 36864 bytes) in /var/www/html/docroot/core/lib/Drupal/Core/Database/StatementWrapperIterator.php on line 113 request_id="v-7835cc2c-26af-11f0-9699-ef74c8f7c1be"

Some of entities I'm trying to export are extremely small and simple. For example, one block that won't export is of a block type that only has one link field, and the particular block I'm trying to export has only one value in that field. Trying to export blocks of the same type on a different multisite works.

Steps to reproduce

I don't know how to help you reproduce this, as it seems to be related to one of our sites or its theme. If there are any module files I can xdebug to provide more info please let me know.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.4

Component

Code

Created by

🇺🇸United States kevinhurley23

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.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇺🇦Ukraine nginex

    I linked a related issue, I will add one more case to the existing patch from that issue to use stub entity approach for link fields, so recursion does not go to deep. Ideally need to provide option how deep recursion can go (how many levels). The option needs to be available from UI export form and in the existing drush command

  • 🇺🇸United States kevinhurley23

    FYI, we tried installing the patch for issue #3511539 (https://git.drupalcode.org/project/single_content_sync/-/merge_requests/...) and now the exports sometimes complete. When they do, we are seeing the same problem described by laureana on comment #16 of the linked issue ( https://www.drupal.org/project/single_content_sync/issues/3511539#commen... 🐛 Recursion takes too much memory compared to earlier versions (1.4.6 or earlier) Active ). For example, when I export the tiny block entity I described in my initial post, the resulting yml file is 820 kb and 9159 lines long because it is recursively exporting the configuration for all linked entities. I have attached a screenshot of the block I'm talking about and the resulting yml file. In the configuration settings for the module, I have set the export mode for both formatted text and menu link of content to "do not export."

Production build 0.71.5 2024