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 ...
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/...
18
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 ...
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 ...
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/...
10
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/...
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\...
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 ...
9
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 ...
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:...
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:
...
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\...
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\...
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 ...
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 ...
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&...
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
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:
...
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
*/
...
6
votes
Magento 2: database error customer_grid_flat doesn't exist
Try to execute the reindex command:
php bin/magento indexer:reindex
I had the same problem and I didn't understand why in the admin panel instead to retrieve data from customer_entity table Magento ...
6
votes
How to check whether the reindex working or not in Magento?
You can check via command line:
php bin/magento i:status
5
votes
Indexer stuck in processing
unfortunately your only option is to change in the database the state of the processing indexes because till there are processing indexes no other index gets updated and neither the command line works....
5
votes
Accepted
Magento 2: New Customers not showing in backend
That's correct. In Magento 2, the indexing process is triggerred by the cron and cannot be triggered manually anymore.
To setup your cron I suggest you follow the official documentation: http://...
5
votes
Get to work reindexing in external code
Create the Reindex.php script in the root folder and add below code in this file.
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';
$params = $_SERVER;
$bootstrap = ...
5
votes
Accepted
5
votes
Magento 2 reindex gives error Duplicate entry
I have also face this issue,your error is Duplicate entry 4458-142-1-1293-4458 in your case the attribute id is 142, go to eav_attribute table and check 142 attrbute backend_type and entity_type_id, ...
5
votes
Magento 2.2.5 - Table catalogsearch_fulltext_scope1 not being automatically generated
I just fixed same issue on my server. Access to server and run:
("Magento" is my database name)
cd /var/lib/mysql/Magento
rm -rf catalogsearch_fulltext_scope1.ibd
php bin/magento indexer:reindex ...
5
votes
How to check whether the reindex working or not in Magento?
Indexers can be managed/updated by two following ways.
Update on Save: This runs every time when ever you are making any changes to the particular field & save it. viz. When a customer is buying ...
5
votes
How to check whether the reindex working or not in Magento?
You have enabled Update on Save, so the reindex will occur in realtime whenever a change is made in the admin. So you might not have done any changes for that indexers product category and catalog ...
5
votes
Which server settings can cause Magento reindex to run really slow?
And another Answer --- thanks to the Chat with Wilson Hauck:
He pointed out, that the quotes might confuse the new optimized in 10.3
I took the full query.sql from above and extracted only the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
reindex × 545magento2 × 222
magento-1.9 × 83
indexing × 74
database × 59
product × 43
indexer × 35
error × 29
cron × 29
elasticsearch × 29
catalog × 25
index × 25
url-rewrite × 22
magento-2.1 × 19
price × 19
magento2.3 × 16
cache × 16
magento2.4 × 16
category × 15
magento-enterprise × 14
cli × 14
catalogsearch × 13
magento-1.7 × 11
php × 11
magento2.2 × 11