Issue Bug Closed

#75783Unoptimized query exceeds memory_limit in lowlevel

Stefan Froemken 04/19/16, 15:24 updated 10/02/18, 11:13

Description

Hello Core-Team,

following command:

/usr/local/bin/php5-55STABLE-CLI /www/123/rp-hosting/123/123/typo3cms/project1/typo3/cli_dispatch.h lowlevel_cleaner missing_relations -r --refindex update

results in memory_limit exceeded.

I have startet a debug session. It has nothing to do with the refindex itself. It has more to do with the “missing_relations” Argument.
This argument starts MissingRelationsCommand which will execute:

$recs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_refindex', 'ref_table<>' . $GLOBALS['TYPO3_DB']->fullQuoteStr('_FILE', 'sys_refindex') . ' AND ref_uid>0' . $filterClause, '', 'sorting DESC');

I have pre- and appended a memory_get_peak_usage(TRUE) which results in:

Before: 15466496 Bytes
After: 104857600 Bytes

I think it’s too much to retrieve nearly all table information from sys_refindex at that point.

Stefan

Reviews 2