Magento 2 Reindex Error: Index is locked by another reindex process. Skipping.

Problem

During full reindex in CLI (Command Line Interface, SSH), Magento returns error message like “index is locked by another reindex process. Skipping.”

Reason

Error is possible if the previous reindex process wasn’t completed successfully. There are a few possible reasons for this issue:

  • Fatal PHP error during reindexing
  • Mysql Error (like timeout)
  • Memory limit
  • Process was unexpectedly interrupted (by a user or another process)

Solution

Proven Solution: The extension Improved Asynchronous Re-indexing can automatically validate the status of all indexes and run reindex if some index was broken or invalid.

You need reset index status and then try to run a new reindex process. For reset index status, you need run command:

bin/magento indexer:reset <index identifier>

If you don’t know the index identifier (code), you can use the command:

bin/magento indexer:info

All possible combinations for native indexes:

bin/magento indexer:reset design_config_grid;
bin/magento indexer:reset customer_grid;
bin/magento indexer:reset catalog_category_product;
bin/magento indexer:reset catalog_product_category;
bin/magento indexer:reset catalogrule_rule;
bin/magento indexer:reset catalog_product_attribute;
bin/magento indexer:reset cataloginventory_stock;
bin/magento indexer:reset catalog_product_price;
bin/magento indexer:reset catalogrule_product;
bin/magento indexer:reset catalogsearch_fulltext;

Possible error messages

  • Design Config Grid index is locked by another reindex process. Skipping.
  • Customer Grid index is locked by another reindex process. Skipping.
  • Product Flat Data index is locked by another reindex process. Skipping.
  • Category Flat Data index is locked by another reindex process. Skipping.
  • Category Products index is locked by another reindex process. Skipping.
  • Product Categories index is locked by another reindex process. Skipping.
  • Product Price index is locked by another reindex process. Skipping.
  • Product EAV index is locked by another reindex process. Skipping.
  • Catalog Rule Product index is locked by another reindex process. Skipping.
  • Catalog Product Rule index is locked by another reindex process. Skipping.
  • Stock index is locked by another reindex process. Skipping.
  • Catalog Search is locked by another reindex process. Skipping.
Loading...