Skip to main content
138 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 ...
Mukesh Chapagain's user avatar
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 ...
Prakash Patel's user avatar
23 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!
Nithin Ninan's user avatar
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 != ...
KAndy's user avatar
  • 20.9k
23 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 ...
Adam Stacey's user avatar
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 ...
MaYaNk's user avatar
  • 1,730
21 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/...
Sagar Dobariya's user avatar
17 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 ...
Aurélien FOUCRET's user avatar
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 ...
Christopher Hackett's user avatar
15 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` ...
Adam Stacey's user avatar
13 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 ...
Juliano Vargas's user avatar
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; ...
Sohel Rana's user avatar
  • 35.9k
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\...
TimVroom's user avatar
  • 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/...
Siarhey Uchukhlebau's user avatar
9 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\...
ManiMaran A's user avatar
  • 1,136
9 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 ...
Jackson's user avatar
  • 9,939
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:...
Khan arman's user avatar
9 votes
Accepted

Magento 2 | Reindex very slow in local server

Reindexing on MariaDB 10.4 takes more time compared to other MariaDB or MySQL versions. As a workaround, we suggest modifying the default MariaDB configuration and setting the following parameters: ...
Bilal Usean's user avatar
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\...
Taschert's user avatar
  • 569
8 votes

catalog_product index does not exist yet. Make sure everything is reindexed

Please check https://github.com/Smile-SA/elasticsuite/issues/318#issuecomment-435322698, that fixed it for me. As this is a bit old, the command should be : bin/magento config:set catalog/search/...
Petar Borisovski's user avatar
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 ...
Yogesh Trivedi's user avatar
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 ...
SR_Magento's user avatar
  • 5,209
7 votes
Accepted

Magento 2: How to display error message in CLI

If you are inside the execute method why don't you put the error message inside $output->writeln($errorMessage);? Where you have access to the OutputInterface Update: Inject \Symfony\Component\...
belfort1's user avatar
  • 462
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 ...
Rick Schippers's user avatar
7 votes
Accepted

Magento 2 while reindex INSERT INTO 'catalog_category_product_index_store1' stuck the query

Most probably the difference is that on live you have way more traffic than on your local env and this is interfering with the queries. I recommend reducing the number of rows processed at once by the ...
Marius's user avatar
  • 198k
7 votes

Magento2 Elastic Search Configuration Issue

Check if the required modules are installed and enabled. In my case (during an update from Magento 2.3 to Magento 2.4) the modules "Magento_Elasticsearch" and "Magento_Elasticsearch6&...
poebel's user avatar
  • 101
6 votes

Magento 2: Not showing customers in backend grid

Best option is to reset and then reindex via CLI php bin/magento indexer:reset customer_grid php bin/magento indexer:reindex customer_grid
Alta Works's user avatar
6 votes

Magento2 prevent reindex after adding product programmatically

inject \Magento\Indexer\Model\IndexerFactory to the __construct method instantiate it as class variable ($this->_indexerFactory right now) run the following code after saving product: ...
Mammouth's user avatar
  • 731
6 votes

how to reindex magento 2 in wamp server windows8

Try This. open cmd and run it as administrator. C:\wamp\bin\php\php5.5.12>php.exe C:\wamp\www\Magento\www\bin\magento indexer:reindex hope this will help you.
HiMs's user avatar
  • 119
6 votes

how reindex and flush cache via code in magento 2?

indexer:reindex CMD: php bin/magento indexer:reindex //for all php bin/magento indexer:reindex catalog_category_product //for specific id Using DI /** * @var \Magento\Indexer\Model\IndexerFactory */ ...
jyotiranjan.in's user avatar

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