Memory error when saving an entityqueue in draft.

Created on 8 May 2023, over 1 year ago
Updated 9 May 2023, over 1 year ago

Problem/Motivation

When saving an entityqueue, receiving an out of memory error.

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /code/web/core/modules/jsonapi/src/Normalizer/NormalizerBase.php on line 43

Steps to reproduce

  • Drupal 10.0.9, entityqueue 8.x-1.6
  • Create a taxonomy with the following:
    • 2 text (formatted, long) fields
    • 1 media reference field (image)
    • 1 text plain field
  • Create an entity queue (Simple queue) that allow terms from the taxonomy created in step 1.
  • Enable content moderation on the entity queue.<\li>
  • The taxonomy has about 45 terms, all published. The entityqueue has 10 items.<\li>
  • Media does not have content moderation but taxonomy does.
  • Re-order the terms in the queue and save as a draft - memory error.
  • Gatsby settings are as follows (URL's are set in settings.php):

_core:
  default_config_hash: BIF1XkAtawwKqq0loNDY0e8Gh_t4D4kqByvny6Pub3c
server_url: ''
preview_callback_url: ''
path_mapping: ''
incrementalbuild_url: ''
contentsync_url: ''
build_published: false
recursive_relationships: false
log_json: true
custom_source_plugin: ''
supported_entity_types:
  - block_content
  - entity_subqueue
  - media
  - menu_link_content
  - node
  - path_alias
  - taxonomy_term
  - paragraph
publish_private_files: null
delete_log_entities: true
log_expiration: '604800'
prevent_selfreferenced_entities: true
number_items_delete: 500

The following patches have been applied:

    "patches": {
      "drupal/core": {
        "3047110 - Enable Content Moderation integration for taxonomy terms": "https://www.drupal.org/files/issues/2023-04-27/enable_content_moderation_for_terms-3047110-49.patch",
        "3173241 - latest_version form state redirect assumes route parameters": "https://www.drupal.org/files/issues/2023-04-27/add_all_params_with_redirect-3173241-13.patch",
        "3308707 - Deprecated function - Files: UrlGenerator.php and AliasPathProcessor": "https://www.drupal.org/files/issues/2023-05-05/suppress_error_when_empty_path-3308707-15.patch",
        "2350939 - Implement a generic revision UI": "https://www.drupal.org/files/issues/2023-03-08/2350939-317-9.5.x.patch",
        "2936995 - Add taxonomy term revision UI": "https://www.drupal.org/files/issues/2023-05-04/add-taxonomy-revision-ui-2936995-25.patch"
      },
      "drupal/metatag": {
        "2945817 - Support JSON API, REST, GraphQL and custom normalizations": "https://www.drupal.org/files/issues/2022-10-13/metatag-data-type-support-2945817-154.patch"
      },
      "drupal/gatsby": {
        "3347297 - draft content leaking into live server": "https://www.drupal.org/files/issues/2023-05-04/3347297-5.patch",
        "3327462 - Drupal 10 compatibility issues": "https://www.drupal.org/files/issues/2023-03-03/3327462-14.patch",
        "3355444 - Recursive loading of relationships causes memory errors on save": "https://www.drupal.org/files/issues/2023-05-05/recursive_setting-3355444-5.patch"
      }
    }

Proposed resolution

Prevent gatsby module from using too much memory.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada slydevil Halifax

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

Comments & Activities

  • Issue created by @slydevil
  • πŸ‡¨πŸ‡¦Canada slydevil Halifax
  • πŸ‡ΊπŸ‡ΈUnited States apmsooner

    @slydevil, wonder if you just created a node type called "queue" that had a multi-valued entity reference field for terms which seems like sort of the same thing entity queue is doing? Just curious if there would be any different outcome and perhaps theres some unknown peculiarities with entity queue itself.

Production build 0.71.5 2024