0

Catalog URL Rewrites Index process is working now.

Please try run this process later.

While i do index management this is the error i am getting

What i have tried

  • Give 777 permission to var/locks folders
  • Delete all file of var/locks folder.
  • migrated to another database

But still i cant solve the problem. How to resolve this issue? its almost 3 days

3

Whenever I have problems with indexing from the admin panel I try indexing using SSH.

So if you have SSH-Access please use the following codes:

reindex all indexes

php -f /shell/indexer.php reindexall

reindex specific index

example:

php indexer.php --reindex catalog_product_attribute

catalog_product_attribute     Product Attributes
catalog_product_price         Product Prices
catalog_url                   Catalog Url Rewrites
catalog_product_flat          Product Flat Data
catalog_category_flat         Category Flat Data
catalog_category_product      Category Product
catalogsearch_fulltext        Catalog Search Index
cataloginventory_stock        Stock status
  • I tried to do but it show Could not open input file: indexer.php – user3769957 Oct 19 '15 at 4:23
  • its in the folder your-root/shell. run the codes from there! – Stefan Gregori Oct 19 '15 at 9:25
  • Thank you it works but. When i give one more time from backend its processing.. What might be the issue. How to resolve completely – user3769957 Oct 19 '15 at 10:02
  • Just a clue but it seems to me that the indexing process itself takes longer than your php max_execution_time or you running out of memory. Any additional error messages in var/report or var/log that can help point out the problem? – Stefan Gregori Oct 19 '15 at 12:46
  • I dont find any error logs related to that.. How to increase the memory . – user3769957 Oct 20 '15 at 6:43
0

You can reindex it programmatically :
1.Create a file on your magento root dir and run it to reindex Catalog URL Rewrites.

<?php 
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
umask(0);
Mage::app('admin');
Mage::register('isSecureArea', 1);
$process = Mage::getModel('index/indexer')->getProcessByCode('catalog_url');
$process->reindexAll();
$process->reindexAll();

?>

Or See below for a better way to reindex each index:

<?php 
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
umask(0);
Mage::app('admin');
Mage::register('isSecureArea', 1);
/* @var $indexCollection Mage_Index_Model_Resource_Process_Collection */
$indexCollection = Mage::getModel('index/process')->getCollection();
foreach ($indexCollection as $index) {
    /* @var $index Mage_Index_Model_Process */
    $index->reindexAll();
}
?>
  • I tried this also not working – user3769957 Oct 19 '15 at 4:27
0

Since Magento 1.9.1.0 database locks are used by default. Those locks can only be released by the thread which obtained them or by killing that thread. This is a workaround to be able to index anyway:

1) Execute in SSH, in Magento root dir

mkdir -p var/locks; rm -f var/locks/*

2) Create a new PHP file in your shell dir containing:

<?php
require_once '../app/Mage.php';
umask(0);
Mage::app('admin');
$process = Mage::getSingleton('index/indexer')->getProcessByCode('catalog_product_flat');
$process->setData('use_file_lock',1); // force file lock
$process->reindexAll();

3) Execute the PHP script you created in your shell dir.

0

Not sure does it help you or not but It solved out my issue. I was crossed the same issue in one of the Magento setup. I followed below steps and it resolved my issue of catalog URL index stuck.

Steps which I followed:

  1. Try to truncate table core_url_rewrite from database.
  2. Remove files from var/locks folder that created on Magento root directory.
  3. if you have SSH then try to run indexing one by one using indexer for more info check this link https://www.branded3.com/blog/re-indexing-magento-command-line/
  4. If you don't have SSH info then try to run create a PHP script which will do indexing for you as @Jeroen Vermeulen BVBA suggested.

For more help check this link Hope that will help to you.

0

Make sure the /var/locks folder has 777 permission and the locks files have 666 permission.

Still, not working?. Clear /var/locks files and try to reindex from SSH with below syntax:

Before proceeding just clear all the lock files under /var/locks

php shell/indexer.php -reindexall

Reindexing from code level:

Before proceeding just clear all the lock files under /var/locks

https://makandracards.com/magento/10687-reindex-via-code

If the code throws the error just increase the server max_execution_time.

This works for me!!!!

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.