Project

General

Profile

Actions

Bug #100804

open

Sorting pages: Allowed memory size exhausted

Added by Florian Seirer 12 months ago. Updated 9 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Performance
Target version:
-
Start date:
2023-05-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Files

pages_040523-1112.csv (27.8 KB) pages_040523-1112.csv Updated export file Florian Seirer, 2023-05-04 09:13
Actions #1

Updated by Florian Seirer 12 months ago

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

Actions #2

Updated by Oliver Hader 12 months ago

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?

Actions #3

Updated by Florian Seirer 12 months ago

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

And we don't use workspaces.

Actions #4

Updated by Christian Kuhn 12 months ago

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.

Actions #5

Updated by Florian Seirer 12 months ago

  • File deleted (pages_040523-0928.csv)
Actions #7

Updated by Oliver Hader 12 months ago

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)

Actions #8

Updated by Riccardo De Contardi 9 months ago

  • Category set to Performance
Actions

Also available in: Atom PDF