I had no problems with the price index of the site, it was always possible reindexes it normally. But now whenever I try to reindex prices, I got this exception:

2015-12-05T18:49:17+00:00 DEBUG (7): Exception message: SQLSTATE[HY000] [2013] Lost connection to MySQL server during query
Trace: #0 /home/mysite/www.mysite.com/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute()
#1 /home/mysite/www.mysite.com/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute()
#2 /home/mysite/www.mysite.com/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute()
#3 /home/mysite/www.mysite.com/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query()
#4 /home/mysite/www.mysite.com/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query()
#5 /home/mysite/www.mysite.com/lib/Zend/Db/Adapter/Abstract.php(734): Varien_Db_Adapter_Pdo_Mysql->query()
#6 /home/mysite/www.mysite.com/app/code/core/Mage/Index/Model/Resource/Event.php(146): Zend_Db_Adapter_Abstract->fetchAll()
#7 /home/mysite/www.mysite.com/app/code/core/Mage/Index/Model/Process.php(214): Mage_Index_Model_Resource_Event->getUnprocessedEvents()
#8 /home/mysite/www.mysite.com/app/code/core/Mage/Index/Model/Process.php(258): Mage_Index_Model_Process->reindexAll()
#9 /home/mysite/www.mysite.com/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(182): Mage_Index_Model_Process->reindexEverything()
#10 /home/mysite/www.mysite.com/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Index_Adminhtml_ProcessController->massReindexAction()
#11 /home/mysite/www.mysite.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch()
#12 /home/mysite/www.mysite.com/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match()
#13 /home/mysite/www.mysite.com/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#14 /home/mysite/www.mysite.com/app/Mage.php(683): Mage_Core_Model_App->run()
#15 /home/mysite/www.mysite.com/index.php(100): Mage::run()
#16 {main}

After I got error, index price flag still in processing status. So I used SHOW PROCESSING LIST on Mysql to check and it is not running.

I tried remove index price lock in var/lock/ and run again, but I got the same exception.

After I got error, I check mage_catalog_product_index_price_idx and mage_catalog_product_index_price_tmp and both have all prices (each customer group) for all products.


Along with this problem arose another very strange error. In all sections and all grids in adminhtml the currency is multiplied by 10000. But how I said, the prices are still "normal" in database.

multiplied by 10000

I noticed these problems started when I used the following module: http://www.magentocommerce.com/magento-connect/product-review-import-export.html, but I've used it in other project (Magento too) with success, so it's turn the situation more strange.

When I tried use the dataflow of extension to import reviews, there was a missing field in CSV, and all lines occurred error, but the whole procedure was normal and no review was imported. Soon after I realized the problem of currency (* 10000), I tried reindex prices and I got the exception about Mysql.

All other functionality of Magento function normally. I tried to debug the prices reindex process, but it seems normal to where I am. As far as I realized the error SQLSTATE [HY000] [2013] Lost connection to MySQL server During query is not a timeout problem, I believe increase the exection time in Mysql settings is not a way out, it seems a connection problem, but I'm not sure because I am using EC2 + RDS (on the same VPC) and frontend works normally.


I tried debug on deep the problem with currency. So the wrong result coming from toCurrency method on Zend_Currency, so I change my mind because the Zend lib is untouched.

Then I fount this: https://github.com/magento/magento2/issues/966. I'm not using Magento 2 but I'm using HHVM. I restarted the HHVM and the currency returned to normal. I don't know why this has occurred, I didn't change the HHVM options in recent weeks (but still need to check it with the rest of the team if anyone did).

Now I'm looking for Price Index Exception solution.

  • Are you indexing from backend or with shell command ... could be a web timeout problem ... currently I use shell script for reindexing 5000 spare parts as reindexing from backend results in error. Some information about reindexing from shell link – Kozure Jan 14 '16 at 16:22

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.