Stopping the Magento indexing process
How can I stop the indexing process? I had imported 15,00开发者_StackOverflow中文版0 products and started the indexing, but now it's stuck on processing for "Category search index". It has been stuck on processing for two days now, how can I stop the indexing process?
Any help would be appreciated, thank you in advance.
When Magento starts indexing of each item in the 'Index Management' list it sets 'status' field of correlative entire of 'index_process' table to 'working'. If error happens during the indexing process script halts and status remains as 'working'. As a result 'processing' image hangs at the 'Index Management' page. Of course there's no way to make sure that indexing process is still not running but checking your server's processes list (or brutal restarting or your apache).
The only intelligent way I know to solve this issue is to find out what causing this error and fix it. You can do it by running indexing from your shell and looking for the output. Here is the command:
php shell/indexer.php reindexall
If you don't have an SSH access you can also try locating this error from your server's error logs.
If you just want to remove 'processing' image you can just run the following MYSQL query:
UPDATE `index_process` SET `status` = 'pending' WHERE `status` = 'working'
However this will not solve the problem, but only hide the output.
Probably the easiest way is to restart Apache. It will gracefully close any open visitor connections, and should terminate the PHP process.
--------- EDIT ----------
There are a set of tables in the database that look to be related to the indexing, index_process
and index_process_event
. You could try reverting the state of the relevant record there to pending and try again...
Keep in mind, if you are running magento under a different user than the one you are currently using (www-data vs mySshLoginUser), you might open yourself up to permissions problems on the lock files. If you have manually run the shell indexer, those lock files will belong to your ssh user.
Worst case scenario, delete those lock files in var/locks/* and try it.
精彩评论