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?

  • Another attempt overnight has resulted in an all-green index status. – Aaron Pollock Feb 20 '13 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 '13 at 9:23
  • Did you find the problem? Share the details with us plase! – Fabian Blechschmidt May 6 '13 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. – Aaron Pollock May 6 '13 at 16:40
  • Is there any reason you are only capturing sterr and not stout too. Eg. 2>&1 – Ben Lessani - Sonassi May 22 '13 at 7:50
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.

  • Wouldn't the lock file make it show "Processing" continuously even when it's finished? That's not what's happening. – Aaron Pollock Feb 21 '13 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 '13 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". – Aaron Pollock Feb 22 '13 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, privacy policy and cookie policy

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