Search code examples
typo3typo3-8.xtypo3-8.7.xtypo3-console

TYPO3 console - error when running cleanup:updatereferenceindex


I get an error when running cleanup:updatereferenceindex:

typo3cms cleanup:updatereferenceindex --verbose --show-progress
Record tt_content:2823 0 indexes were added and 1 stale indexes were removed.
80424/5208014 [>---------------------------] 1% 18 secs
Record static_countries:41 4 indexes were added and 4 stale indexes were removed.
81880/5208014 [>---------------------------] 1% 19 secsKilled

...
Updating reference index. This may take a while …
81883/5208017 [>---------------------------] 1% 57 secs
mmap() failed: [12] Cannot allocate memory Killed

What might causes this and how can I get it to run through and update the reference index?


Solution

  • The reason is quite clear:

    Cannot allocate memory Killed

    means that the process was killed because PHP has not enough memory.
    Fixing the issue could be done either by running the process several times or better by increasing the available memory for PHP in php.ini with the parameter max_memory_limit.
    If you're unable to increase the memory for PHP you've always a problem. Even if you've a local copy of the installation (with less restrictive memory-settings) and could do indexing there to update the server-database with your local database, the system is hardly usable for working online with it.

    If you can increase the memory for PHP everything will be fine, else you should increase the hosting-package or change the hosting-company.