2

I am getting error while trying to reindex catalog search with the following command:

php bin/magento indexer:reindex catalogsearch_fulltext

Here is the error that I am getting while running the above reindex command:

PHP   2. Symfony\Component\Console\Application->run() /var/www/html/magento2/bin/magento:23
PHP   3. Magento\Framework\Console\Cli->doRun() /var/www/html/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:126
PHP   4. Symfony\Component\Console\Application->doRun() /var/www/html/magento2/vendor/magento/framework/Console/Cli.php:96
PHP   5. Symfony\Component\Console\Application->doRunCommand() /var/www/html/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:195
PHP   6. Symfony\Component\Console\Command\Command->run() /var/www/html/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:874
PHP   7. Magento\Indexer\Console\Command\IndexerReindexCommand->execute() /var/www/html/magento2/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
PHP   8. Magento\Indexer\Model\Indexer->reindexAll() /var/www/html/magento2/vendor/magento/module-indexer/Console/Command/IndexerReindexCommand.php:57
PHP   9. Magento\CatalogSearch\Model\Indexer\Fulltext->executeFull() /var/www/html/magento2/vendor/magento/module-indexer/Model/Indexer.php:412
PHP  10. Magento\CatalogSearch\Model\Indexer\IndexerHandler->saveIndex() /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext.php:111
PHP  11. Magento\Framework\Indexer\SaveHandler\Batch->getItems() /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/IndexerHandler.php:95
PHP  12. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIterator->next() /var/www/html/magento2/vendor/magento/framework/Indexer/SaveHandler/Batch.php:23
PHP  13. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIterator->next() /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/IndexIterator.php:198
PHP  14. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIterator->next() /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/IndexIterator.php:198
...
...
...
/var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/IndexIterator.php:198
PHP 253. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider->prepareProductIndex() /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/IndexIterator.php:232
PHP 254. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider->getSearchableAttributes() /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/DataProvider.php:421
PHP 255. Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor->getBackendType() /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/DataProvider.php:225
PHP 256. Magento\Framework\Interception\PluginList\PluginList->getNext() /var/www/html/magento2/var/generation/Magento/Catalog/Model/ResourceModel/Eav/Attribute/Interceptor.php:880
PHP Fatal error:  Maximum function nesting level of '256' reached, aborting! in /var/www/html/magento2/vendor/magento/framework/Session/SaveHandler.php on line 80
PHP Stack trace:
PHP   1. {main}() /var/www/html/magento2/bin/magento:0
PHP   2. Symfony\Component\Console\Application->run() /var/www/html/magento2/bin/magento:23
PHP   3. Magento\Framework\Console\Cli->doRun() /var/www/html/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:126
PHP   4. Symfony\Component\Console\Application->doRun() /var/www/html/magento2/vendor/magento/framework/Console/Cli.php:96
PHP   5. Symfony\Component\Console\Application->doRunCommand() /var/www/html/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:195
PHP   6. Symfony\Component\Console\Command\Command->run() /var/www/html/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:874
PHP   7. Magento\Indexer\Console\Command\IndexerReindexCommand->execute() /var/www/html/magento2/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
PHP   8. Magento\Indexer\Model\Indexer->reindexAll() /var/www/html/magento2/vendor/magento/module-indexer/Console/Command/IndexerReindexCommand.php:57
PHP   9. Magento\CatalogSearch\Model\Indexer\Fulltext->executeFull() /var/www/html/magento2/vendor/magento/module-indexer/Model/Indexer.php:412
PHP  10. Magento\CatalogSearch\Model\Indexer\IndexerHandler->saveIndex() /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext.php:111
PHP  11. Magento\Framework\Indexer\SaveHandler\Batch->getItems() /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/IndexerHandler.php:95
PHP  12. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIterator->next() /var/www/html/magento2/vendor/magento/framework/Indexer/SaveHandler/Batch.php:23
PHP  13. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIterator->next() /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/IndexIterator.php:198
PHP  14. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIterator->next() /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/IndexIterator.php:198
...
...
...
/var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/IndexIterator.php:198
PHP 253. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider->prepareProductIndex() /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/IndexIterator.php:232
PHP 254. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider->getSearchableAttributes() /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/DataProvider.php:421
PHP 255. Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor->getBackendType() /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/DataProvider.php:225
PHP 256. Magento\Framework\Interception\PluginList\PluginList->getNext() /var/www/html/magento2/var/generation/Magento/Catalog/Model/ResourceModel/Eav/Attribute/Interceptor.php:880
1

Have you activated XDebug?

If you activated XDebug, you should deactivate it or set the maximum nesting level in the php.ini higher:

xdebug.max_nesting_level=500
  • I had one configurable product which had around 300 associated products. That might be the reason causing this error. Because of it the nesting level seems to be crossed 256 limit. – Mukesh Chapagain Sep 16 '16 at 5:30
  • Does this work for you @MukeshChapagain? – Kumar A. Sep 22 '16 at 11:38
  • Sorry. I think I had deleted some of the associated products before. May be due to less number of associated products, the reindexing worked before. However, now when I try adding a configurable product with 200+ associated products & also update xdebug.max_nesting_level to 500, I am still getting the same error. – Mukesh Chapagain Sep 23 '16 at 6:28
  • Did you try to deactivate XDebug? – David Nguyen Sep 30 '16 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.