1

I have this error when I execute this script
php shell/indexer.php --reindex catalog_product_price

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[HY000]: General error: 3 Error writing file '/tmp/MYAry6Yi' (Errcode: 28), query was: INSERT INTO `mage_catalog_product_index_price_opt_agr_idx` SELECT `i`.`entity_id`, `i`.`customer_group_id`, `i`.`website_id`, `o`.`option_id`, IF(MIN(o.is_require) = 1, MIN(IF(IF(otps.option_type_price_id > 0, otps.price_type, otpd.price_type) = 'fixed', IF(otps.option_type_price_id > 0, otps.price, otpd.price), ROUND(i.price * (IF(otps.option_type_price_id > 0, otps.price, otpd.price) / 100), 8))), 0) AS `min_price`, IF((MIN(o.type)='radio' OR MIN(o.type)='drop_down'), MAX(IF(IF(otps.option_type_price_id > 0, otps.price_type, otpd.price_type) = 'fixed', IF(otps.option_type_price_id > 0, otps.price, otpd.price), ROUND(i.price * (IF(otps.option_type_price_id > 0, otps.price, otpd.price) / 100), 8))), SUM(IF(IF(otps.option_type_price_id > 0, otps.price_type, otpd.price_type) = 'fixed', IF(otps.option_type_price_id > 0, otps.price, otpd.price), ROUND(i.price * (IF(otps.option_type_price_id > 0, otps.price, otpd.price) / 100), 8)))) AS `max_price`, IF(MIN(i.base_tier) IS NOT NULL, IF(MIN(o.is_require) > 0, MIN(IF(IF(otps.option_type_price_id > 0, otps.price_type, otpd.price_type) = 'fixed', IF(otps.option_type_price_id > 0, otps.price, otpd.price), ROUND(i.base_tier * (IF(otps.option_type_price_id > 0, otps.price, otpd.price) / 100), 8))), 0), NULL) AS `tier_price`, IF(MIN(i.base_group_price) IS NOT NULL, IF(MIN(o.is_require) > 0, MIN(IF(IF(otps.option_type_price_id > 0, otps.price_type, otpd.price_type) = 'fixed', IF(otps.option_type_price_id > 0, otps.price, otpd.price), ROUND(i.base_group_price * (IF(otps.option_type_price_id > 0, otps.price, otpd.price) / 100), 8))), 0), NULL) AS `group_price`, `i`.`zone_id` FROM `mage_catalog_product_index_price_final_idx` AS `i`
 INNER JOIN `mage_core_website` AS `cw` ON cw.website_id = i.website_id
 INNER JOIN `mage_core_store_group` AS `csg` ON csg.group_id = cw.default_group_id
 INNER JOIN `mage_core_store` AS `cs` ON cs.store_id = csg.default_store_id
 INNER JOIN `mage_catalog_product_option` AS `o` ON o.product_id = i.entity_id
 INNER JOIN `mage_catalog_product_option_type_value` AS `ot` ON ot.option_id = o.option_id
 INNER JOIN `mage_catalog_product_option_type_price` AS `otpd` ON otpd.option_type_id = ot.option_type_id AND otpd.store_id = 0
 LEFT JOIN `mage_catalog_product_option_type_price` AS `otps` ON otps.option_type_id = otpd.option_type_id AND otpd.store_id = cs.store_id GROUP BY `i`.`entity_id`,
    `i`.`customer_group_id`,
    `i`.`website_id`,
    `o`.`option_id`,
    `i`.`zone_id` ON DUPLICATE KEY UPDATE `min_price` = VALUES(`min_price`), `max_price` = VALUES(`max_price`), `tier_price` = VALUES(`tier_price`), `group_price` = VALUES(`group_price`)' in /www/sites/mywebsite.com/files/html/lib/Zend/Db/Statement/Pdo.php:235
Stack trace:
#0 /www/sites/mywebsite.com/files/html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /www/sites/mywebsite.com/files/html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /www/sites/mywebsite.com/files/html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /www/sites/mywebsite.com/files/html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ma...', Array)
#4 /www/sites/mywebsite.com/files/html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ma...', Array)
#5 /www/sites/mywebsite.com/files/html/app/code/community/Innoexts/Core/Helper/Catalog/Product/Price/Indexer.php(984): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ma...')
#6 /www/sites/mywebsite.com/files/html/app/code/community/Innoexts/Zone/Model/Mysql4/Catalog/Product/Indexer/Price/Default.php(91): Innoexts_Core_Helper_Catalog_Product_Price_Indexer->applyCustomOption(Object(Magento_Db_Adapter_Pdo_Mysql), 'mage_catalog_pr...', 'mage_catalog_pr...', 'mage_catalog_pr...', true)
#7 /www/sites/mywebsite.com/files/html/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php(121): Innoexts_Zone_Model_Mysql4_Catalog_Product_Indexer_Price_Default->_applyCustomOption()
#8 /www/sites/mywebsite.com/files/html/app/code/community/Innoexts/Zone/Model/Mysql4/Catalog/Product/Indexer/Price.php(176): Mage_Catalog_Model_Resource_Product_Indexer_Price_Default->reindexAll()
#9 /www/sites/mywebsite.com/files/html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Innoexts_Zone_Model_Mysql4_Catalog_Product_Indexer_Price->reindexAll()
#10 /www/sites/mywebsite.com/files/html/app/code/core/Mage/Index/Model/Process.php(212): Mage_Index_Model_Indexer_Abstract->reindexAll()
#11 /www/sites/mywebsite.com/files/html/app/code/core/Mage/Index/Model/Process.php(260): Mage_Index_Model_Process->reindexAll()
#12 /www/sites/mywebsite.com/files/html/shell/indexer.php(167): Mage_Index_Model_Process->reindexEverything()
#13 /www/sites/mywebsite.com/files/html/shell/indexer.php(215): Mage_Shell_Compiler->run()
#14 {main}
1

The key here is 'Error writing file '/tmp/MYAry6Yi'

Check the following:

  • Storage Space, specifically to where /tmp/ is mounted (possible tmpfs?)
  • Permissions of the /tmp/ folder
|improve this answer|||||
  • the command mysqladmin -u dbuser -p var | grep tmpdir give me /tmp and df -f give me: 3.8G 77M 3.5G 3% /tmp – devopsmagento Mar 25 '15 at 15:58
  • In one terminal, run watch df , in another run the re-index command. What happens to space on tmp? Does it get used (up), or is the error you are getting immediate, with no space usage? (which would possibly hint on permissions) – ProxiBlue Mar 25 '15 at 22:11
  • Also an indicator for enforced resource sharing on shared servers, the database size has been given a forced hard limit and reports it's out of disk space when the limit is reached, even though you seemingly have copious quantities of space. – Fiasco Labs May 18 '15 at 5:06

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.