Magento - There was a issue with reindexing process - Catalog Products

12,160

Solution 1

This could be anything. The

There was a problem with reindexing process.

error occurs when a PHP Exception bubbles up to the surface from the reindexProcessAction action. You can see that code here.

#File: app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php
public function reindexProcessAction()
{
    $process = $this->_initProcess();
    if ($process) {
        try {
            Varien_Profiler::start('__INDEX_PROCESS_REINDEX_ALL__');

            $process->reindexEverything();
            Varien_Profiler::stop('__INDEX_PROCESS_REINDEX_ALL__');
            $this->_getSession()->addSuccess(
                Mage::helper('index')->__('%s index was rebuilt.', $process->getIndexer()->getName())
            );
        } catch (Mage_Core_Exception $e) {
            $this->_getSession()->addError($e->getMessage());
        } catch (Exception $e) {
            $this->_getSession()->addException($e,
                 Mage::helper('index')->__('There was a problem with reindexing process.')
            );
        }
    } else {
        $this->_getSession()->addError(
            Mage::helper('index')->__('Cannot initialize the indexer process.')
        );
    }

    $this->_redirect('*/*/list');
}

Specifically, this line

Mage::helper('index')->__('There was a problem with reindexing process.')

The quickest way to the bottom of this error is to temporarily change the above line so that it prints out the exception message. Magento surpress the default exception message — probably in an effort to prevent end-users from seeing an "ugly" PHP error. Change the above to it reads

Mage::helper('index')->__('There was a problem with reindexing process. ' . $e->getMessage())

And then reindex again. The PHP error message, which should point to the problem code, will be included in your error message. This should help point to the exact problem that's causing your index to fail.

Solution 2

Here I found another solution and its work for me. I first create reindex.php and it place in my root folder then past below code

require_once 'app/Mage.php';
umask( 0 );
Mage :: app( "default" );
Mage::log("Started Rebuilding Search Index At: " . date("d/m/y h:i:s"));
$sql = "truncate csr_catalogsearch_fulltext;";
$mysqli = Mage::getSingleton('core/resource')->getConnection('core_write');
$mysqli->query($sql);
for ($i = 1; $i <= 9; $i++) {
    $process = Mage::getModel('index/process')->load($i);
   $process->reindexAll();
}
echo Mage::log("Finished Rebuilding Search Index At: " . date("d/m/y h:i:s"));

After run this file (www.example.com/reindex.php) I got an an error message like as ..

General error: 1005 Can't create table catalog_category_flat_store_1' (errno: 150)

Then I just run the following query in my database. Like as

ALTER TABLE catalog_category_entity ENGINE=INNODB;
ALTER TABLE core_store ENGINE=INNODB;

Then clean all cache and run re-index process from amdin panel and it's run successfully. I recommended to I'm not sure if it will help at all with your issue.

Solution 3

Hey buddy you can truncate the table of catalog and run the reindex again and it will run with a charm.. tables name to truncate catalog_product_flat_*

"CAUTION: before making any changes in database take a backup" mysqldump [dbname]> [anyname].sql

Share:
12,160
Jason Millward
Author by

Jason Millward

Updated on June 05, 2022

Comments

  • Jason Millward
    Jason Millward almost 2 years

    I have just reindexed the data on my Magenot installation running v1.6 and i'm now getting a message stating

    There was a problem with reindexing process.
    

    for Category Products and now no products are displayed in any any of the categories. I need to fix this asap as its happened on a live site.

    Does anyone have any idea what might be causing this and what the fix is?

    I have tried deleting the contents on var/report and var/locks but no joy. There seems to be a few fixes but not specifically for Category Products

    Thanks in advance

  • Jason Millward
    Jason Millward about 12 years
    Its now showing and error Cannot initialize the indexer process. I tried adding . $e->getMessage()) to the end of the line Mage::helper('index')->__('Cannot initialize the indexer process.') but its no showing anything. Do you have any ideas of what the issue might be?
  • Alan Storm
    Alan Storm about 12 years
    Well, if you're getting a different error the above code will never run. The "Cannot initialize the indexer process" is raised if the code in _initProcess can't run, which should only happen if the process page isn't passing on your request id paramater. That should give you enough to go on. Good luck!
  • Jason Millward
    Jason Millward about 12 years
    Ok I understand that the _initProcess can't run which is why i'm getting the error but i'm not sure where to go from there to sort the problem out. Is there a way I can get the error to output when I run the reindex? I really appreciate your help as i'm a little out of my depth here!
  • Alan Storm
    Alan Storm about 12 years
    Add (temporary) debugging code the method to determine why it's failing. var_dump($processId);exit; to see if the ID is being properly passed etc. Try to figure out why this method is returning false, and it might/should point to what's wrong with your system.
  • Kingshuk Deb
    Kingshuk Deb over 10 years
    awesome very helpfull..
  • Halil
    Halil over 8 years
    My problem was related to DROP database privilege. After I granted DROP privilege to the database user, the problem is resolved.