In Magento 2, Sometimes an issue comes like the indexing process gets locked at the time of reindexing. When the process or the index type is locked then you cannot reindex that specific locked index type. The reindex will always skip that index type and you will get an error as below.
“Index is locked by another reindex process. Skipping”
So in this case, To Unlock Reindex Process you need reset index status and then try to run a new reindex process.
To reset index status, use below command
1 | php bin/magento indexer:reset <index identifier> |
Example:
1 | php bin/magento indexer:reset cataloginventory_stock |
If you want to reset all the indexes, use below command
1 | php bin/magento indexer:reset |
If you don’t know the index identifier, use below command
1 | php bin/magento indexer:info |
Output:
1 2 3 4 5 6 7 8 9 10 11 12 13 | design_config_grid Design Config Grid customer_grid Customer Grid catalog_category_product Category Products catalog_product_category Product Categories catalogrule_rule Catalog Rule Product catalog_product_attribute Product EAV cataloginventory_stock Stock inventory Inventory catalogrule_product Catalog Product Rule catalog_product_price Product Price scconnector_google_remove Google Product Removal Feed scconnector_google_feed Google Product Feed catalogsearch_fulltext Catalog Search |
If you want to know the status of the all indexes, use below command
1 | php bin/magento indexer:status |
Thats it. Enjoy Magento 2!!
Leave a Reply