I get the error "Stock Status Index process is working now. Please try run this process later." when trying to reindex. Other answers say to clear var/lock/.
where is var/lock in 1.9?
var/locks/ (note the "s") directory is created whenever you start an indexing process. Magento writes out a lock file to this directory. Removing the lock files may resolve issues with reindexing.
Like in previous Magento versions, in Magento 1.9 you can find this directory here:
[your Magento install dir]/var/
If the directory isn't there, Magento hasn't created it. If this is the case, then you should look for other solutions for fixing the reindexing issue.
var directory doesn't have the right permissions. Magento needs sufficient permissions to be able to create the
var/locks directory and write out the lock files. Try setting permissions for
var to (at least) 755.
If this doesn't help, maybe you can reindex via SSH or try restarting your webserver.
It was quite difficult to find out where is these locks are saving.
By default Magento saving the locks in the database, in these case you may not find any /var/locks folder in your server.
Debugging further I reached in the file app\code\core\Mage\Index\Model\Resource\Helper\Mysql4.php
Run these queries in your mysql console
SELECT IS_USED_LOCK('dev_toystore_magento.index_process_3') //this is for catalog url rewrite
The same way you can release, lock from here.
Find a impressive blog out there
in magento 1.9 the index lock in database is
to release a lock
there are different number index_process_number for different index process. the process id number can be found from admin area.
Direct access in DB is the "index_process" table. I had to delete one that was still running from a removed plug-in