Search code examples
mysqldoctrine-ormtypo3typo3-8.xtx-indexed-search

Commands out of sync; you can't run this command now - error on TYPO3 backend module of EXT:indexed_search


In the production environment of my TYPO3 8.7 installation I get this error message when I try to open the TYPO3 backend module "Indexing":

Commands out of sync; you can't run this command now 

Doctrine\DBAL\Driver\Mysqli\MysqliException thrown in file
/home/www/html-data/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php in line 280.

The problem seems to be in the loop in vendor/typo3/cms/typo3/sysext/indexed_search/Classes/Domain/Repository/AdministrationRepository.php in function getRecordsNumbers()

After some research it seems that closeCursor() is necessary, but I wasn't able to integrate that.

The funny thing is, that the error only occurs in my production environment. On the development machine, everything works fine!

So is this now a TYPO3 bug or a configuration problem of my production machine?

My environment:

  • TYPO3 8.7.20
  • Production:

    • PHP 7.2.8
    • MySQL 5.6.37
    • mysqlnd 5.0.12-dev
  • Development:

    • PHP 7.2.7
    • MySQL 5.5.60
    • mysqlnd 5.0.12-dev

Only difference is that in the development environment pdo_mysql is not present.

enter image description here


Solution

  • It turned out that the index of the database table index_rel was broken.

    Deleting the table and rebuilding it solved my problem.