Hot answers tagged

136 votes
Accepted

Magento 2 How to unlock reindex process

You can reset the indexer through command line with indexer:reset command. This will give the list of indexes name: php bin/magento indexer:info Output: design_config_grid ...
129 votes
Accepted

Magento 2 Reindexing - One or more indexers are invalid. Make sure your Magento cron job is running

to reindex in magento 2, go to the CLI and then the root folder of your magento installation and run the below command : php bin/magento indexer:reindex
51 votes
Accepted

How to reindex Magento 1.x by using command line

step 1 : cd [MAGENTO_ROOT]/shell/ You should replace [MAGENTO_ROOT] with your own absolute path to Magento root folder. For example /home/Thief/public_html/ Then list all files to see what we have ...
23 votes
Accepted

Magento 2: Not showing customers in backend grid

Looks like some error happened in the process of re-index and index status left processing. You need to reset it DB. For example by query: update indexer_state set status = 'invalid' where status != ...
  • 20.4k
22 votes

Magento 2 Reindexing - One or more indexers are invalid. Make sure your Magento cron job is running

Run this command in your CLI php bin/magento indexer:reindex and if you want to reindex only one indexer then write following command: php bin/magento indexer:reindex indexer_name. where ...
  • 1,730
22 votes
Accepted

Magento 2 - Moving site - 'No such entity'

I had the same issue. It appeared to be caused by some Entity IDs that needed to be set to 0. When you transfer the data the insert records on these specific records are automatically generated and ...
22 votes

Magento 2: Not showing customers in backend grid

Magento 2 not showing customers in backend grid: Run the below commands for fix 1) php bin/magento indexer:reset customer_grid 2) php bin/magento indexer:reindex customer_grid Thanks!
20 votes

How to reindex Magento 1.x by using command line

You can use Go to shell folder and run this cmd php indexer.php --reindexall For separate php yourmagentofolder/shell/indexer.php -reindex catalog_product_attribute php yourmagentofolder/shell/...
17 votes

Indexer stuck in processing

You can fix this from the command line by reseting the index which will invalidate the state of the index and remove the processing flag from the index. php bin/magento indexer:reset Optionally you ...
16 votes

Magento 2 How to unlock reindex process

When I faced this kind of situation I had to run the following SQL query directly into the database: UPDATE indexer_state SET status = 'valid'; I was not able to to find any option to force ...
15 votes

Product Attributes could not be reindexed

How to interpret the error message SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2828-148-1-471' for key 'PRIMARY In the case of the product attribute indexer, this means ...
  • 639
14 votes

Magento 2 reindex returns No such entity

Not sure if this is too late to add, but when I had this It appeared to be caused by some entity ids that needed to be set to 0. This script worked for me: SET FOREIGN_KEY_CHECKS=0; UPDATE `store` ...
11 votes
Accepted

Magerun vs Command line indexer

There should be no difference.
  • 874
11 votes

Magento 2: Run reindexer programmatically

Mainly you need to fire product related indexing. So you need to initialize IndexerFactory following way. /** * @var \Magento\Indexer\Model\IndexerFactory */ protected $indexerFactory; ...
  • 34.6k
11 votes
Accepted

Magento 2 Reindex Fail `Unknown column 'entity_value.value'` in 'field list'

I've found the problem: Table: catalog_product_super_attribute was inserted a row with attribute_id that didn't exist e.g I have size and colour in table eav_attribute I have size id=2 and colour ...
10 votes
Accepted

Magento 2 reindex returns No such entity

In addition to Raphael: I Debugged this code with altering the exception constructor for debug purposes (either by xdebug or old dumps). Alter the construct of the exception for now (the file is \lib\...
  • 374
10 votes
Accepted

Magento 2: How to set cron for reindex in SSH in magento 2?

You can launch reindex a separate index as independent process, like: * * * * * /usr/bin/php /Users/uchuhlebov/web/m212/www/bin/magento indexer:reindex catalog_category_product >> /Users/...
9 votes
Accepted

Magento Category URL Key Removed after Reindexing

In Magento Enterprise 1.13 (or 1.12) url_key attribute was moved to its own table catalog_category_entiry_url_key (similarly product url_key attribute has its own table catalog_product_entiry_url_key)....
  • 5,808
9 votes
Accepted

reindex command error (No alive nodes found in your cluster)

If you are using Magento and getting 'No alive nodes found in your cluster' error while reindexing. Make sure you have updated following : Your Host and port : '[host]:[port]'. Eg: 'es-node1.fqdn:...
8 votes

Cannot reindex Catalog URL Rewrites

Do not truncate: core_url_rewrite This is the worst advice ever, you will lose all customized SEO urls! Just dont do it! What worked for me was SSH and running: php -f ./shell/indexer.php -- -...
8 votes

Magento 2: Run reindexer programmatically

<?php namespace Vendor\ModuleName\Controller; class Reindex extends \Magento\Framework\App\Action\Action { CONST PRICE_INDEXER_ID = 'catalog_product_price'; /** * @var \Magento\Indexer\Model\...
  • 1,046
8 votes

Magento 2 How to unlock reindex process

On MySQL run: SET SQL_SAFE_UPDATES = 0; update indexer_state set status = 'invalid' where status != 'valid'; Then on your terminal run: php bin/magento indexer:reindex It normally happens when ...
  • 9,553
8 votes
Accepted

Reindexing Magento 2 causes products to be missing on the frontend (not the backend)

You can find a fix in Magento 2 GitHub. The issue is present on 2.1.5. https://github.com/magento/magento2/issues/8018 One of the soulution is to add a preference <preference for="Magento\...
  • 539
7 votes

Product Attributes could not be reindexed

Below solution worked for me and may help others : 2828-148-1-471 refers to: product entity id: 2828 attribute id: 148 store id: 1 value: 471 Just open product with id 2828 and save it and reindex ...
7 votes
Accepted

Magento indexing is failing, SQLSTATE[23000]: Integrity constraint violation

it seams that you have zombie data in the flat table for store with id 1. The prepareFlatTable method is trying to add a Foreign Key to the catalog_product_entity table and that fails. Most probably ...
  • 196k
7 votes

Magento 2 Reindexing - One or more indexers are invalid. Make sure your Magento cron job is running

Here is how you can get things done using Magento 2 CLI indexing commands Get into your Magento CLI command file available in Magento/bin directory cd magento_folder/bin and run your command directly ...
7 votes

Can anyone tell me how to reindex with Magento 2.0.2

if you are using windows then run this command in cmd C:\wamp\bin\php\php5.5.12>php.exe C:\wamp\www\Magento\www\bin\magento indexer:reindex and if you want to reindex only one indexer then write ...
  • 1,730
7 votes
Accepted

Lock wait timeout exceeded

The error is because the transaction is reaching its timeout period. If you did not set this in your my.cnf the default is 50 seconds I would highly recommend you look at your sever settings to ensure ...
  • 5,189
7 votes
Accepted

Magento 2 Is it possible to run reindexing per storeview?

There is no direct way to do this. But you may be approaching it from the wrong angle anyway. In normal operation you shouldn't have to do a full reindex at any time. If you have the indexing mode ...
6 votes

Re-index error: Cannot initialize the indexer process

Svetoslav, In the future please post the specs about your hosting OS, version of Magento, etc. I am going to just post some typical solutions to your problem. Run Indexing from the CLI from the CLI ...
  • 328

Only top scored, non community-wiki answers of a minimum length are eligible