Skip to content

Error while reindexing Catalog Search (Fatal error: Maximum function nesting level of '256' reached, aborting!) #6722

@chapagain

Description

@chapagain

Preconditions

  1. I am using Magento version 2.1.1
  2. PHP version 5.6
  3. I have sample data installed in my Magento site.

Steps to reproduce

  1. Add a configurable product with around 300 associated products to it.
  • Login to admin
  • Go to PRODUCTS -> Catalog
  • Add Configurable Product (Click on Add Product button & Select Configurable Product)
  • Under 'Configurations' section, Click on "Create Configurations" button
  • A popup window appears which has 4 steps to complete.
  • The first step is "Select Attributes". Select 'Color' & 'Size' attributes.
  • Click 'Next' button.
  • The second step is 'Attribute values'
  • I have 12 Color options and 20 size options (Note that I have sample data installed in my Magento)
  • I selected all color options and all size options
  • Click Next button
  • The third step is 'Bulk Images and Price'. Don't change anything here. Just click 'Next' button.
  • The final step is 'Summary'. It shows the list of associated products. Click 'Next' button.
  • The popup windows is now closed.
  • Click on the 'Save' button to save the product.
  • It will take a while but the product will be saved finally.
  1. Then, try to reindex Catalog Search with the following command

php bin/magento indexer:reindex catalogsearch_fulltext

Expected result

Expected to get message like "Catalog Search reindex has been completed successfully".

Actual result

Got the following error:

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

Solution tried

My xdebug.max_nesting_level was set as 256. I updated php.ini and set it to 500.

xdebug.max_nesting_level=500

But, that didn't solve this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions