Bug #100804
openSorting pages: Allowed memory size exhausted
0%
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
Updated by Florian Seirer over 1 year ago
Most pages have two or three subpages. Indexed_search is not installed (we use solr).
Updated by Oliver Hader over 1 year 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?
Updated by Florian Seirer over 1 year ago
Sure. Would an export with the impexp extension (pages table only) be even more useful?
And we don't use workspaces.
Updated by Christian Kuhn over 1 year 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.
Updated by Florian Seirer over 1 year ago
- File pages_040523-1112.csv pages_040523-1112.csv added
Updated by Oliver Hader over 1 year 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)