Join over 10,000 ecommerce enthusiasts who receive free updates
Get email updates
Build A "Smarter"
Magento Store
Magik Extra Fees Create unlimited number & types of extra fees and charges to drive increased revenue per order.
$199  $99

Most popular posts

How To Resolve Magento ReIndexing Errors In Your Magento Store

 

Resolve Magento ReIndexing Errors, Problems

Magento uses index heavily for faster processing and retrieval or records from the database. Most of the time when you update products ideally you were re-indexing your so that Magento indexes the updated records and show them on frontend. Read this interesting post to learn How To Run Magento Indexer From Command Line.

The approach is fine but sometimes when you re-index from Magento admin panel you will notice errors like “An error occurred while saving the URL rewrite” or “cannot initialize indexer process” etc.

There can be numerous factors for such errors i.e.

  • php.ini maximum execution time & script input time error
  • apache/lighttpd timeout setting issue
  • number of products and store views
  • lock file from previous time preventing indexing to take place

Getting Rid Of Magento ReIndexing Errors

If even after trying multiple times Magento Indexer fails to respond or keep throwing same errors you can take the following steps resolve Magento ReIndexing errors.

1. Locate var/locks directory and remove all files under this directory. This will clear all the locks for re-indexing to take place again.

2. Now, login to your MysQSL/phpMyAdmin to run the following MySQL query (Ensure that your have taken full backup before committing this MySQL query)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
DELETE cpop.* FROM catalog_product_option_price AS cpop
INNER JOIN catalog_product_option AS cpo
ON cpo.option_id = cpop.option_id
WHERE
cpo.type = 'checkbox' OR
cpo.type = 'radio' OR
cpo.type = 'drop_down';
 
DELETE cpotp.* FROM catalog_product_option_type_price AS cpotp
INNER JOIN catalog_product_option_type_value AS cpotv
ON cpotv.option_type_id = cpotp.option_type_id
INNER JOIN catalog_product_option AS cpo
ON cpotv.option_id = cpo.option_id
WHERE
cpo.type <> 'checkbox' AND
cpo.type <> 'radio' AND
cpo.type <> 'drop_down';

3. Log back in to your Magento Admin panel and go to System tab > Index Management hit index again and you will notice no such errors will appear again. You can follow these same steps again if re-indexing stops in future to resolve Magento ReIndexing issues.

I would love to hear your experiences and questions about Magento Indexing, ReIndexing and indexing errors. Please leave me a comment and let me know.

 
Enjoyed this Post?
Then you can follow us here:

Subscribe to RSS
Follow us on Twitter
Follow us on Facebook

Ashish Nayyar

Chief Product Officer & Architect. MagikCommerce.com

Build A "Smarter" Magento Store
Magik Extra Fees Magik Extra Fees is the #1 extention for creating unlimited number & types of extra fees and charges to drive increased revenue per order.
  • Extra Fee for Products
  • Extra Fee for Categories
  • Extra Fee for Shipping
  • Multiple Additional Charges
$199  $99
 
  • chitra

    can we speed up magento reindexing for large number of products. ?
    if yes then how ?
    is there any mysql query to fasten this process ?