9

We are running Magento store having 8k products. The tow indexing is not working. Throwing some errors. Product Flat Data Error

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

Catalog Search Index

Catalog Search Index index process unknown error:
exception 'Zend_Cache_Exception' with message 'Could not determine temp directory, please specify a cache_dir manually' in /var/www/vhosts/beadsofcambay.com/httpdocs/lib/Zend/Cache.php:209
Stack trace:
#0 /var/www/vhosts/beadsofcambay.com/httpdocs/lib/Zend/Cache/Backend.php(197): Zend_Cache::throwException('Could not deter...')
#1 /var/www/vhosts/beadsofcambay.com/httpdocs/lib/Zend/Cache/Backend/File.php(123): Zend_Cache_Backend->getTmpDir()
#2 /var/www/vhosts/beadsofcambay.com/httpdocs/lib/Zend/Cache.php(153): Zend_Cache_Backend_File->__construct(Array)
#3 /var/www/vhosts/beadsofcambay.com/httpdocs/lib/Zend/Cache.php(94): Zend_Cache::_makeBackend('File', Array, false, false)
#4 /var/www/vhosts/beadsofcambay.com/httpdocs/lib/Zend/Locale/Data.php(940): Zend_Cache::factory('Core', 'File', Array, Array)
#5 /var/www/vhosts/beadsofcambay.com/httpdocs/lib/Zend/Locale.php(668): Zend_Locale_Data::getContent('en_US', 'date', NULL)
#6 /var/www/vhosts/beadsofcambay.com/httpdocs/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php(763): Zend_Locale::getTranslation(NULL, 'date', Object(Zend_Locale))
#7 /var/www/vhosts/beadsofcambay.com/httpdocs/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php(699): Mage_CatalogSearch_Model_Resource_Fulltext->_getStoreDate(1, NULL)
#8 /var/www/vhosts/beadsofcambay.com/httpdocs/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php(634): Mage_CatalogSearch_Model_Resource_Fulltext->_getAttributeValue(145, NULL, 1)
#9 /var/www/vhosts/beadsofcambay.com/httpdocs/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php(230): Mage_CatalogSearch_Model_Resource_Fulltext->_prepareProductIndex(Array, Array, 1)
#10 /var/www/vhosts/beadsofcambay.com/httpdocs/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php(128): Mage_CatalogSearch_Model_Resource_Fulltext->_rebuildStoreIndex(1, NULL)
#11 /var/www/vhosts/beadsofcambay.com/httpdocs/app/code/core/Mage/CatalogSearch/Model/Fulltext.php(83): Mage_CatalogSearch_Model_Resource_Fulltext->rebuildIndex(NULL, NULL)
#12 /var/www/vhosts/beadsofcambay.com/httpdocs/app/code/core/Mage/CatalogSearch/Model/Indexer/Fulltext.php(446): Mage_CatalogSearch_Model_Fulltext->rebuildIndex()
#13 /var/www/vhosts/beadsofcambay.com/httpdocs/app/code/core/Mage/Index/Model/Process.php(207): Mage_CatalogSearch_Model_Indexer_Fulltext->reindexAll()
#14 /var/www/vhosts/beadsofcambay.com/httpdocs/app/code/core/Mage/Index/Model/Process.php(253): Mage_Index_Model_Process->reindexAll()
#15 /var/www/vhosts/beadsofcambay.com/httpdocs/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#16 /var/www/vhosts/beadsofcambay.com/httpdocs/shell/indexer.php(198): Mage_Shell_Compiler->run()
#17 {main} 

Both indexes are run from command line. I Googled both errors but did not find any suitable solutions.

4

5 回答 5

3

几天前我遇到了同样的问题。

1 - 请进行数据库备份

2 - 关闭 Magento 中的使用平面产品和类别选项,并将索引模式从产品平面数据切换到手动更新;

3 - 现在进入您的数据库。删除 catalog_product_flat_xx 表;

4 - 您必须通过 SSH 重新索引目录。它应该如下所示:

usr/local/bin/php public_html/shell/indexer.php --reindex catalog_product_flat

Magento 将为每个商店创建新表。我可以花点时间。

完成后,您可以激活 Flat products 选项并检查 Magento 是否可以自己进行重新索引。

于 2013-04-17T06:03:35.853 回答
1

我无法重新索引catalog_product_flat索引过程。花了一天时间在互联网上尝试了几种解决方案。我能够解决这个问题。下面是步骤。

  1. 创建面临索引问题的 Magento Db 的克隆。
  2. 将数据库转储到新创建的数据库中。
  3. 截断catalog_product_flat_1单个商店的表,对于多个商店,将有多个表catalog_product_flat_*,其中*商店 id 是。这里截断所有的表。
  4. 将 mangento 运行实例指向新创建的数据库并配置数据库,以便该站点正常运行。
  5. 现在运行命令php document_root/shell/indexer.php --reindex catalog_product_flat或尝试从管理员重新索引。php document_root/shell/indexer.php --reindexall用于重新索引所有过程。
于 2014-12-09T05:25:46.647 回答
1

截断产品平面数据,然后再次运行此脚本。应该是外键约束问题。

于 2013-04-11T18:21:52.213 回答
1

当我尝试手动更改具有 FK(关系)的列时,我看到了该错误。截断平面索引表应该让它消失——如果失败,也可以尝试 DELETE FROM 而不是 TRUNCATE。

有多少属性设置为在前端可见(并添加到平面表中)?MySQL 每行有 64k 的限制,如果你破坏它可能会发生坏事(比如损坏的表......)

第二个错误看起来只是错误的缓存设置 (local.xml) 或 var 文件夹的文件权限问题。

于 2013-04-18T13:37:34.873 回答
-1

我在目录搜索中重新索引时遇到了同样的问题...... 10 天后,我找到了解决方案。

我得到的目录搜索索引错误:

带有消息“SQLSTATE [HY000]”的异常“PDOException”:一般错误:1785 当@@GLOBAL.ENFORCE_GTID_CONSISTEN CY = 1 时,只能在自动提交的语句或单语句事务中完成对非事务表的更新,而决不能在与更新事务表相同的语句。

解决方案是:

  1. 丢弃表catalogsearch_fulltext
  2. catalogsearch_fulltext使用现有结构再次创建表。
  3. catalogsearch_query使用打击提到的查询更新表。

    更新目录搜索查询 SET is_processed = 0

然后打开您的 SSH 并运行命令以使其再次工作:

[~/public_html/shell]# php indexer.php reindexall
于 2016-07-22T09:08:59.440 回答