Stopping the Magento indexing process

18,902

Solution 1

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.

Solution 2

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...

Solution 3

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.

Share:
18,902

Related videos on Youtube

jarus
Author by

jarus

a cool guy.........

Updated on May 08, 2022

Comments

  • jarus
    jarus about 2 years

    How can I stop the indexing process? I had imported 15,000 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.

  • Vince P
    Vince P almost 13 years
    Interesting reading! Going to give it a go as we're been running an index process for over 12 hours which says it is still processing on the front end but have our suspicions as to if it is still running!