Home » Magento » Magento reindexing problems – Solutions

Magento reindexing problems – Solutions

If you have magento store sure you have seen “There was a problem with reindexing process” error message.If you try to reindex from magento admin panel, all options are not reindexing.There are may be category flat data,product flat data and product prices reindex errors.Here I’ll describes how to solve this reindex problem in the magento store.

Please keep backup files before do these methods.

What are the reasons for magento reindexing error

  • The number of products
  • The number of stores
  • The apache/lighttpd timeout settings
  • There are references to deleted products in catalog_product_flat_% tables
  • The php.ini maximum execution time

Method-1

1-Backup the table “catalog_category_product_index” with “Disable foreign key checks” marked.

2-Drop that table from the database.

3-Open that mysql file of the table and remove the constraints at the bottom, except “SET FOREIGN_KEY_CHECKS=1;” .Then it look like this.

4-Save and execute that file in that database.

5-Then clear the magento all cache and do the reindexing process in the magento backend.

If not success, do the following Method-2.

Method-2

1-Increase your execution time value in the .htaccess file.

2-Create a file reindexing.php in the root.

3-Copy the following scripts,paste and save that file.

4-Then clear the magento all cache and run this file as http://mymagento.com/reindexing.php

Note:Sometimes it will take long time because it will reindexing all.If you have shell access do the following method to do this quickly.

php shell/indexer.php reindex all

Method-3

How to solve “An error occurred while saving the URL rewrite” or “cannot initialize indexer process” problems

1-Goto the magento root directory and goto var/locks directory and delete all the files under it.

2-Change the var/locks folder permission to 777.

3-Run the following mysql query in your database.

4-Clear the magento all cache and try to reindexing process in the magento backend.

Method-4

1-Log into the phpmyadmin and find “catalog_product_flat_%” tables.Those are

  • catalog_product_flat_1
  • catalog_product_flat_2
  • catalog_product_flat_3

2-Try to truncate/empty those tables.

3-Clear the magento all cache and try to reindexing process in the magento backend.

That’s all.If you have problems,ideas,tips about this put as comments below.

Tags

Similar posts

  • Mujtaba

    Product Prices index process unknown error:
    exception ‘PDOException’ with message ‘SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn’t match value count at row 1’ in /var/www/lib/Zend/Db/Statement/Pdo.php:228
    Stack trace:
    #0 /var/www/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
    #1 /var/www/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
    #2 /var/www/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
    #3 /var/www/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
    #4 /var/www/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(‘INSERT INTO ca...', Array)
    #5 /var/www/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO
    ca…’, Array)
    #6 /var/www/app/code/local/Innoexts/StorePricing/Model/Mysql4/Downloadable/Indexer/Price.php(125): Varien_Db_Adapter_Pdo_Mysql->query(‘INSERT INTO `ca…’)
    #7 /var/www/app/code/core/Mage/Downloadable/Model/Resource/Indexer/Price.php(47): Innoexts_StorePricing_Model_Mysql4_Downloadable_Indexer_Price->_prepareFinalPriceData()
    #8 /var/www/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(385): Mage_Downloadable_Model_Resource_Indexer_Price->reindexAll()
    #9 /var/www/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindexAll()
    #10 /var/www/app/code/core/Mage/Index/Model/Process.php(209): Mage_Index_Model_Indexer_Abstract->reindexAll()
    #11 /var/www/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
    #12 /var/www/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
    #13 /var/www/shell/indexer.php(198): Mage_Shell_Compiler->run()
    #14 {main}

    above is the error i got from reindexing from shell. i applied above methods but still product pricing gives error.

    • Did you apply Method-1 ? This is happened after updated to new version.Can you tell the exactly magento version ? Because in the new version need to updated include a couple of new fields in the database.

      • Krishna

        Hi,
        I have sa
        me above error. m
        upgraded version is 1.9.1.0pls help me to solve this

  • Pingback: unable to reindex product flat data have tried the following also magento search not working | DL-UAT()

  • Pingback: Unable to reindex product flat data | DL-UAT()

  • Bret

    Wow, thanks for this, just what i needed. After a lot of googling this was the one for me.
    The combination of removing the files in ‘ var / locks ‘ and running ‘reindexer.php’ fixed it.

    • Glad to hear that was fixed Bret. Thanks for your comment. Good luck !