1

Immediately after reindexing the Catalog URL Rewrites, Magento says we need to reindex them again. I'm using the command line to run indexer.php as a background task:

nohup php indexer.php --reindex catalog_url > /home/ubuntu/rewrites_index_20130218 2> /home/ubuntu/rewrites_index_20130218.err < /dev/null &

The Index Management screen shows "Processing" on the relevant row while this runs, but reverts to "Reindex Required" once completed.

The output file rewrites_index_20130218 says that the reindex completed successfully. The rewrites_index_20130218.err is empty. The files system.log and exception.log in Magento's log folder are both clean.

On a previous attempt last night, the index failed due to too many MySQL locked tables. I increased the MySQL innodb_buffer_pool_size and restarted MySQL and we're not getting that issue now.

I have deliberately run the indexing when I know for certain that nobody from the team is working in the Magento admin area.

What would cause the rewrites table to need to be reindexed so often, or if that's not obvious, what steps could I take to identify the cause of the problem?

6
  • Another attempt overnight has resulted in an all-green index status. Feb 20, 2013 at 8:03
  • You can try our custom URL rewrite module. Its much faster then magento one, open source and free. ecomdev.org/2011/10/08/ecomdev-breaks-magento-speed-limits.html
    – Sergey
    Feb 20, 2013 at 9:23
  • Did you find the problem? Share the details with us plase! May 6, 2013 at 8:19
  • I never really got to the bottom of this unfortunately. It just worked after about three or four attempts so I didn't explore it further. May 6, 2013 at 16:40
  • Is there any reason you are only capturing sterr and not stout too. Eg. 2>&1 May 22, 2013 at 7:50

2 Answers 2

1

Its really simple. The indexing process did not remove the 'lock process' flag either in the Database or the actual lock file in /var/locks/

you can rm * in /var/locks or look at the indexing table in the database... so no it doesn't need to be indexed again, the lock just wasn't cleared during the process. Check your permissions on /var as well.

3
  • Wouldn't the lock file make it show "Processing" continuously even when it's finished? That's not what's happening. Feb 21, 2013 at 10:16
  • Yes a lock file would make it continually show processing. Also if the indexing process didn't change the status in the indexing table in the database it would show processing continuously... use grep and look @ the processes running on the server, or check mysql and look at the processes running... it is phantom, it has already completed.
    – mprototype
    Feb 21, 2013 at 22:03
  • I don't think you've understood the problem. It didn't show "Processing", it actually completed successfully, but then immediately showed "Reindex Required". Feb 22, 2013 at 10:13
0

Is the indexing mode set to Manual Update?

If that's the case and an indexing event (for exmaple a placed order) happens to occur while the indexer is running, the status of the index will be automatically revert back to "Reindex Required".

See Mage_Index_Model_Process::reindexAll:

$unprocessedEvents = $eventResource->getUnprocessedEvents($this);
if ($this->getMode() == self::MODE_MANUAL && (count($unprocessedEvents) > 0)) {
    $this->_getResource()->updateStatus($this, self::STATUS_REQUIRE_REINDEX);
} else {
    $this->_getResource()->endProcess($this);
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.