2

The Catalog Category Flat Data has been now stuck for weeks and i can't seem to fix it.

I tried to change the corresponding table in the database:

TRUNCAT catalog_product_flat_1, catalog_product_flat_2, etc...

I tried to run the indexer manually:

<?php
require_once('app/Mage.php'); 
$app = Mage::app('admin');
$indexer = 5;
{
     $reindexProcess = Mage::getModel('index/process')->load($indexer);
     $reindexProcess->reindexAll();
}  
echo "Done!";
?>

I tried to run the indexer with shell:

<?php
set_time_limit(0);
error_reporting(0);
require_once('app/Mage.php'); 
umask(0);
$indexer="/shell/indexer.php";
if(file_exists($indexer))
{
        $idxlist=array("catalog_product_flat");
        foreach($idxlist as $idx)
        {
            echo "reindex $idx n ";
            exec("php shell/indexer.php --reindex $idx");
        }
}
echo "Done!";
?>

I tried deleting the lock files in /var/locks/ but they are being created automatically every hour or so:

index_process_1.lock
index_process_2.lock
index_process_3.lock
index_process_4.lock
index_process_10.lock
index_process_11.lock
index_process_5.lock
index_process_6.lock
index_process_7.lock
index_process_8.lock
index_process_9.lock

I also tried rebooting the server and apache.

I even checked if the table engine is InnoDB or not by using:

SHOW TABLE STATUS

But really nothing seems to help. I can't even change the status of the category flat data in the magento backend -> configuration, because it is grayed out.

Do you guys know of any suggestions/solutions to this issue?

  • when you try to reindex does the process finish successfully? do you see the "Done!" message? – Alex Dinca Jan 24 '15 at 14:36
  • @alex.ayg, no it shows a blank screen without any errors or messages. It seems as if Magento doesn't respond to reindex process of indexer 5. Because if i change 5 to any other indexer, it works fine. – Hans Jan 24 '15 at 21:16
  • Before truncating those tables, be sure to set SET FOREIGN_KEY_CHECKS=0; before the TRUNCATE command and SET FOREIGN_KEY_CHECKS=1; after. – seanbreeden Jan 25 '15 at 0:51
  • I did TRUNCAT on those tables on a test environment where everything was functioning well and there everything went fine. TRUNCATE catalog_product_flat_1, catalog_product_flat_2, etc... Going to Index Management and reindexing the Catalog Category Flat data Viewing those tables back in database and the table is full again But as i said that worked like that in a test environment with all the indexers working. But in my production environment somehow the specific indexer is stuck somewhere. This is really strange, something i haven't experienced before. – Hans Jan 25 '15 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.