0

Sice last week the procduct flat index is broken. All other reindexer are working.

Exception:

Product Flat Data index process unknown error:
exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1005 Can't create table 'magento.#sql-37aa_425' (errno: 121)' in /var/www/vhosts/httpdocs/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /var/www/vhosts/httpdocs/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /var/www/vhosts/httpdocs/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /var/www/vhosts/httpdocs/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /var/www/vhosts/httpdocs/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /var/www/vhosts/httpdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ca...', Array)
#5 /var/www/vhosts/httpdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLE `ca...', Array)
#6 /var/www/vhosts/httpdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(327): Varien_Db_Adapter_Pdo_Mysql->query('ALTER TABLE `ca...')
#7 /var/www/vhosts/httpdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(2548): Varien_Db_Adapter_Pdo_Mysql->raw_query('ALTER TABLE `ca...')
#8 /var/www/vhosts/httpdocs/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(806): Varien_Db_Adapter_Pdo_Mysql->addForeignKey('FK_CAT_PRD_FLAT...', 'catalog_product...', 'entity_id', 'catalog_product...', 'entity_id', 'CASCADE', 'CASCADE')
#9 /var/www/vhosts/httpdocs/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(125): Mage_Catalog_Model_Resource_Product_Flat_Indexer->prepareFlatTable(2)
#10 /var/www/vhosts/httpdocs/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(115): Mage_Catalog_Model_Resource_Product_Flat_Indexer->rebuild('2')
#11 /var/www/vhosts/httpdocs/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php(73): Mage_Catalog_Model_Resource_Product_Flat_Indexer->rebuild(NULL)
#12 /var/www/vhosts/httpdocs/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php(303): Mage_Catalog_Model_Product_Flat_Indexer->rebuild()
#13 /var/www/vhosts/httpdocs/app/code/core/Mage/Index/Model/Process.php(166): Mage_Catalog_Model_Product_Indexer_Flat->reindexAll()
#14 /var/www/vhosts/httpdocs/app/code/core/Mage/Index/Model/Process.php(194): Mage_Index_Model_Process->reindexAll()
#15 /var/www/vhosts/httpdocs/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#16 /var/www/vhosts/httpdocs/shell/indexer.php(198): Mage_Shell_Compiler->run()
#17 {main}

if googled a lot about this topic. I had made a lot of tries like altering tables or delete product flat tables. Nothing seems to work.

I tried also the magento database repair tool. Same exception.

Could anyone help me to fix this?

Thanks

boti
  • 677
  • 5
  • 12
  • Have you checked the MySQL privilages of the user connecting? ie, make sure the user in `app/etc/local.xml` can create tables and alter them as well within in MySQL. – B00MER Oct 10 '12 at 15:08
  • will this help? http://learntipsandtricks.com/blog/magento/114/magento-index-management-Cannot-initialize-the-indexer-process – Damodar Bashyal Jan 21 '13 at 22:38
  • Hey thanks for your answer. Something strange happened. I had to move my Shop to a new Server. Dumped the whole DB und moved to the new Server. After success i tryed after a long time to reindex the product flat and now it works o.o i don't know what happened but it works. :))) – boti Jan 24 '13 at 09:12

1 Answers1

0

The last time I had a reindexing issue, I added this to my mysql config file (/etc/my.cnf)

key_buffer = 512M
max_allowed_packet = 64M
table_cache = 512
sort_buffer_size = 4m
read_buffer_size = 4m
read_rnd_buffer_size = 2m
myisam_sort_buffer_size = 64m
tmp_table_size = 128m
query_cache_size = 96m
query_cache_type = 1
thread_cache_size = 8
max_connections = 400
wait_timeout = 300

You may also need to delete a lock file in magento/var/locks/

read more @ http://www.magentocommerce.com/boards/viewthread/36225/

MagePal Extensions
  • 17,646
  • 2
  • 47
  • 62