I am facing one issue in Magento. I am having one Magento store with multi website functionality which containing approx 4500 products. I want to re-indexing product.
I had import 4500 product by csv through magento default functionality. after importing product the changes is not showing on front side so i went to index management and i found there are two indexes are in processing status
1 Product Attributes 2 Product Flat Data
I had already done following steps:
1 try to re-index it from admin side system->index management
2 try to do manually by calling php script
require_once 'app/Mage.php';
umask( 0 );
Mage :: app( "default" );
$process = Mage::getSingleton('index/indexer')->getProcessByCode('catalog_product_flat');
$process->reindexAll();
OR
$indexingProcesses = Mage::getSingleton('index/indexer')->getProcessesCollection();
foreach ($indexingProcesses as $process) {
$process->reindexEverything();
}
Also change the var/locks folder permission to 777 and also rename that folder and also try to delete the .lock file which was created in this lock folder but not got the solution.
I am not having SSH rights. So is there any other solution which will help me to solve re-indexing problem.
Reindexing via Magento 2 AdminLog in to Magento 2 Admin and navigate to System → Index Management. You will see the panel above. Select indexers, which has status Reindex Required, then select in Actions menu Update on Schedule. Press Submit button to apply selected mode to indexers.
During a full reindex in your CLI, Adobe Commerce gives you the error message: 'Index is locked by another reindex process. Skipping. ' In other words, when the process or the index type is locked, then you cannot reindex that particular locked index type. The reindex will always skip that index type.
To solve the "One or more indexers are invalid" error you have to check if the reindex mode and the cron jobs are set up correctly and run the reindex.
NOTE: While the below answer has, in my experience, been relevant to this type of issue, it does not appear to be the cause of the situation currently experienced by the asker
Processing
means one of two things:
The indexes may actually still be runnning, in which case, sit back and wait for them to finish. Magento indexing can take a very long time (for 4500 products, "hours" is possible, depending on the server).
An indexer process may have died, leaving stale locks behind. Meanwhile, the dead indexer may have been run by a different user. The most common case is cron
being incorrectly configured to run the indexer as root
, or a normal user account, rather than as the same user as is used by the website (eg: apache
or www
).
All that Processing
really means is "Magento failed to acquire a lock for these indexer jobs". The first case is trivial and uninteresting. Wait a couple of hours, and if the same indexers are still listed as Processing
, then you may have the second case.
Check the permissions of the lock files, found under var/locks
in your magento root. Are they owned by the same user as the web server is running as? If not, and you are absolutely certain that the indexes are no longer running, it is safe to delete the locks. The next step is to find out why the locks had the wrong permissions in the first place. That is a conversation which might be better had with your host, if you don't have ssh
access.
The errors from the indexer will be caught and not logged by default. The typical workaround is to use the CLI re-index tool; which will be very verbose with any errors.
Eg.
php shell/indexer.php --reindex ...
But given you don't have SSH access - you can either look at the indexer.php
file to see how they generate the errors, or you could just launch a shell_exec
or exec
from a web-based PHP script that would emulate the CLI.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With