A standard reendex magento was used. On test servers with identical database settings, it works fine.

$ php indexer.php --reindexall Stock Status index was rebuilt successfully in 00:00:00 Catalog product price index was rebuilt successfully in 00:00:00 Category URL Rewrites index was rebuilt successfully in 00:00:00 Product URL Rewrites index was rebuilt successfully in 00:00:00 URL Redirects index was rebuilt successfully in 00:00:00 Catalog Category/Product Index index was rebuilt successfully in 00:00:00 Catalog Search Index index was rebuilt successfully in 00:00:00 Tag Aggregation Data index was rebuilt successfully in 00:00:00 Product Attributes index process unknown error: PDOException: There is no active transaction in /var/www/releases/20170105071630Z/public/lib/Zend/Db/Adapter/Pdo/Abstract.php:322 Stack trace: #0 /var/www/releases/20170105071630Z/public/lib/Zend/Db/Adapter/Pdo/Abstract.php(322): PDO->rollBack() #1 /var/www/releases/20170105071630Z/public/lib/Zend/Db/Adapter/Abstract.php(524): Zend_Db_Adapter_Pdo_Abstract->_rollBack() #2 /var/www/releases/20170105071630Z/public/lib/Varien/Db/Adapter/Pdo/Mysql.php(266): Zend_Db_Adapter_Abstract->rollBack() #3 /var/www/releases/20170105071630Z/public/app/code/core/Mage/Core/Model/Resource/Abstract.php(124): Varien_Db_Adapter_Pdo_Mysql->rollback() #4 /var/www/releases/20170105071630Z/public/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Abstract.php(57): Mage_Core_Model_Resource_Abstract->rollBack() #5 /var/www/releases/20170105071630Z/public/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php(185): Mage_Catalog_Model_Resource_Product_Indexer_Eav_Abstract->reindexAll() #6 /var/www/releases/20170105071630Z/public/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Eav->reindexAll() #7 /var/www/releases/20170105071630Z/public/app/code/core/Mage/Index/Model/Process.php(212): Mage_Index_Model_Indexer_Abstract->reindexAll() #8 /var/www/releases/20170105071630Z/public/app/code/core/Mage/Index/Model/Process.php(260): Mage_Index_Model_Process->reindexAll() #9 /var/www/releases/20170105071630Z/public/shell/indexer.php(168): Mage_Index_Model_Process->reindexEverything() #10 /var/www/releases/20170105071630Z/public/shell/indexer.php(216): Mage_Shell_Compiler->run() #11 {main} 

Code: public \ app \ code \ core \ Mage \ Catalog \ Model \ Resource \ Product \ Indexer \ Eav \ Abstract.php

  public function reindexAll() { $this->useIdxTable(true); $this->beginTransaction(); try { $this->clearTemporaryIndexTable(); $this->_prepareIndex(); $this->_prepareRelationIndex(); $this->_removeNotVisibleEntityFromIndex(); $this->syncData(); $this->commit(); } catch (PDOException $e) { die(var_dump($e->errorInfo)); $this->rollBack(); throw $e; } return $this; } 

    1 answer 1

    Hi, the same problem on Magento CE 1.9.3 - helped to disable persistent connections in local.xml, which are then transmitted in the adapter to the PDO object PDO::ATTR_PERSISTENT => true during initialization

    I do not know why, but enabling / disabling in php.ini did not help, but immediately after removing <persistent>1</persistent> from the connection section in local.xml, everything started to work as it should (you need to reset the configuration cache after this change)

    Also, the version of php or the pdo module itself can play a role here, everything worked with this config before the update.

    It was broken here on this version: [root@web ~]# php -v PHP 7.0.16 (cli) (built: Feb 14 2017 17:22:12) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.16, Copyright (c) 1999-2017, by Zend Technologies

    • Thanks, helped. - Efim