0

am trying to reindex Catalog URL Rewrites but it throws an error

"Catalog URL Rewrites Index process is working now. Please try run this process later."

I Am trying to delete var/locks but there is no locks folder

  • what are your permissions for the var folder - can other files be written there ok? Can directories be made by the system? – Jon Holland Jul 29 '16 at 12:37
  • @Jon , 777 for var folder – Ramesh Jul 29 '16 at 12:37
  • Locks can be saved in the database in v1.9. see this post: magento.stackexchange.com/questions/46722/… – Jon Holland Jul 29 '16 at 12:38
  • Thanks Jon, i tried those things but still am getting that error – Ramesh Jul 29 '16 at 12:39
  • or, if you have access to the server console (e.g. shell via ssh) try running the indexing manually – Jon Holland Jul 29 '16 at 12:41
0

Check the index_process table in your DB. The status should be pending for each. You can also see what mode each one is set to (manual or realtime). If not "pending" and it is "working", try resetting the statuses to "pending" - perhaps one at a time and try rerunning the index. You need to make sure that that the indexing isn't actually running though. You can run a mySql command in your shell or mySql workbench to check on currently running processes: SHOW FULL PROCESSLIST; http://dev.mysql.com/doc/refman/5.7/en/show-processlist.html

See this post to see how to run the indexes from the SSH shell: Indexes Stuck on "processing"

If it is any help I attach a little class I use as part of my import processes for reindexing things as I go.

<?php
/*
a suite of functions in one class to assist with reindexing various aspects of magento [jh]
*/
class  JonHolland_MagentoFuncs_Model_Indexman{
/*
   INDEX REFERENCE
    =========

    Process Name            ID  Code
    Product Attributes      1   catalog_product_attribute
    Product Prices          2   catalog_product_price
    Catalog URL Rewrites    3   catalog_url
    Product Flat Data       4   catalog_product_flat
    Category Flat Data      5   catalog_category_flat
    Category Products       6   catalog_category_product
    Catalog Search Index    7   catalogsearch_stock
    Stock Status            9   cataloginventory_stock
    Tag Aggregation Data    9   tag_summary
    */

public function reindexAll(){
    $indexingProcesses = Mage::getSingleton('index/indexer')->getProcessesCollection();
    foreach ($indexingProcesses as $process) {
        $process->reindexEverything();
    }
}

public function reindexAllTwo($maxIndexes=9){

    for($i=0; $i < 9; $i++){ //it starts at 0 :) [jh]
        $process = Mage::getModel('index/process')->load($i);
        $process->reindexAll();
    }
}

public function runSingleIndex($index){
    if(is_numeric($index)){
        //run by id
        try{
            Mage::getSingleton("index/indexer")->getProcessById($index);
        }catch(Exception $ex){
            die("ERROR: ".$ex->getMessage());
        }
    }else{
        //run by code/path
        try{
            Mage::getSingleton("index/indexer")->getProcessByCode($index);
        }catch(Exception $ex){
            die("ERROR: ".$ex->getMessage());
        }
    }
}

public function reindexCatalog(){
    Mage::getSingleton("catalog/index")->rebuild();
}

public function  reindexFlatCatalogProduct(){
    Mage::getResourceModel("catalog/product_flat_indexer")->rebuild();
}

public function reindexInventoryStock(){
    Mage::getSingleton("cataloginventory/stock_status")->rebuild();
}

public function reIndexPrices(){
    $this->runSingleIndex(2);
}

public function setRealTimeIndexing(){
    $pCollection = Mage::getSingleton('index/indexer')->getProcessesCollection(); 
    foreach ($pCollection as $process) {          
      $process->setMode(Mage_Index_Model_Process::MODE_REAL_TIME)->save();
    }
}

public function setManualIndexng(){
    $pCollection = Mage::getSingleton('index/indexer')->getProcessesCollection(); 
    foreach ($pCollection as $process) {
      $process->setMode(Mage_Index_Model_Process::MODE_MANUAL)->save(); 
    }   
}

}//end of class


?>

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.