Issue Bug Closed

#100804Sorting pages: Allowed memory size exhausted

Florian Seirer 05/04/23, 08:02 updated 10/24/26, 07:15

Description

I just tried to sort about 160 pages in the backend (Page tree > context menu > sort subpages) and got a fatal error:
"Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /var/html/t3xxx/web/typo3/sysext/core/Classes/Utility/ArrayUtility.php on line 201"

Unfortunately there is no error stack trace, as the script just exits.

Some of the page titles are quite long (150+ characters, with URLs sometimes over 200 characters long). But apparently 256M – as recommended by TYPO3 11 – isn’t enough, or is there a possible memory leak? Sorting with a php_memory_limit of 512M works, though…

I’ve also tried to sort by the other options. Only sorting by crdate was possible (but not reversed sorting). Interestingly, sorting by tstamp was unsuccessful, even if it’s the same type as crdate.

I have attached a file containing the pages I wanted to sort by page title. Most of them are sorted already, but the editors inserted some pages at the top which should be moved further down the list.

The only other active extension I could think of that maybe has an influence on this is the sluggi extension. But even after uninstalling it the error still occurs.

TYPO3 version is 11.5.26.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Files 1

History 10

  1. Florian Seirer commented <span data-processor="relativetime" data-value="2023-05-04T08:04:23+00:00" > 05/04/23, 08:04 </span>

    Most pages have two or three subpages. Indexed_search is not installed (we use solr).

  2. Oliver Hader commented <span data-processor="relativetime" data-value="2023-05-04T08:56:41+00:00" > 05/04/23, 08:56 </span>

    Can you please update the CSV to include the pid value? This way nesting depth could be spotted easier. Besides that, are you using workspaces?

  3. Florian Seirer commented <span data-processor="relativetime" data-value="2023-05-04T08:59:40+00:00" > 05/04/23, 08:59 </span>

    Sure. Would an export with the impexp extension (pages table only) be even more useful?

    And we don’t use workspaces.

  4. Christian Kuhn commented <span data-processor="relativetime" data-value="2023-05-04T09:04:51+00:00" > 05/04/23, 09:04 </span>

    General note here: We may want to compare v11 and v12 first: I had a memory optimization with #100701, this may be related. For easy and quick first measurements, extension https://github.com/lolli42/peak_memory might become handy.

  5. Oliver Hader commented <span data-processor="relativetime" data-value="2023-05-04T09:41:00+00:00" > 05/04/23, 09:41 </span>

    Since \TYPO3\CMS\Backend\Controller\Page\SortSubPagesController is invoking DataHandler for those 160 pages, my guess is, that memory is exhausted there.
    @SortSubPagesController@ reorders the pages by first sorting the collection (e.g. by title) and then re-adds it in reverse order to the top of the corresponding parent page – basically it’s a “move command to the same page”, however DataHandler still processes all fields of each sys_pages record, to determine possible reference updates and to move along all localizations.

    (besides workspaces, having lots of actually localized pages and content on these pages might be another indicator – I forgot to mention that earlier)

  6. Benni Mack commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2025-03-23T19:21:18+00:00" > 03/23/25, 19:21 </span>

    Please check again with latest v13 changes. We’ve drastically reduced the DB and memory load (thanks to @lolli ) in v13.4.8, so please go ahead and report if this is still an issue.

  7. Benni Mack commented and changed status Needs Feedback Closed <span data-processor="relativetime" data-value="2026-10-24T07:15:51+00:00" > 10/24/26, 07:15 </span>

    CLosing this now due to lack of feedback, I think it is a non-issue now.