Closed DmitriiChukhnov1 closed 7 years ago
I'm having the same issue and disabling the EAV cache does indeed solve the problem (for now)
Using: Magento CE 2.1.1 PHP 7.0
I am having the same issue with a custom EAV model, exactly as described. Disabling the EAV cache did resolve the issue.
Using: Magento CE 2.1.1 PHP 7.0
To disable eav cache only for custom EAV model, I am using this di.xml:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Eav\Model\Entity\AttributeCache">
<arguments>
<argument name="unsupportedTypes" xsi:type="array">
<item name="custom_eav" xsi:type="string">custom_eav</item>
<item name="custom_eav_second" xsi:type="string">custom_eav_second</item>
</argument>
</arguments>
</type>
</config>
Adding the unsupportedType in the di.xml worked like a charm for me! I don't really know what the EAV caching entails and I'm not sure if this has a big influence on performance on the frontend.
Same issue here. First EAV save after cache flush fails. I'm on Magento CE 2.1.2
Hi there - I have same issue on Magento 1.9.3 and we solved it by disabling persistant flag on connections, which is passed to PDO object as PDO::ATTR_PERSISTENT => true
later in adapter
Not sure why, but enabling/disabling persistent in php.ini not helping, just after I removed <persistent>1</persistent>
from connection
section in local.xml it starts to work well
Also we worked on older php7.0 versions and looks like this happen after last upgrade
[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
Buggy EAV Attribute Cache mechanism was removed on Magento 2.2.0 branch: https://github.com/magento/magento2/commit/3ae7c1909daad96d5a0ad6ab7048455448ba7480
This is not something that could be backported due to BC constraints, as a workaround you can try just to disable this cache type.
I had a similar problem in Magento ver. 1.9.3.7 when editing products. To resolve this I disabled all caches and I was able to modify products.
Hello Team,
We caught below error which seems related to this ticket.
Exception catched for order '8000060764' while executing action '\Xtento\TrackingImport\Model\Import\Action\Order\Shipment::ship':
There is no active transaction
Can you please check and advise on it?
Regards, Milen Velinov
Preconditions
Steps to reproduce
Expected result
Actual result
`[2016-09-08 11:11:49] main.CRITICAL: exception 'PDOException' with message 'There is no active transaction' in /
0 //vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(324): PDO->rollBack()
1 //vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(524): Zend_Db_Adapter_Pdo_Abstract->_rollBack()
2 //vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(268): Zend_Db_Adapter_Abstract->rollBack()
3 //vendor/magento/framework/Model/ResourceModel/AbstractResource.php(99): Magento\Framework\DB\Adapter\Pdo\Mysql->rollBack()
4 //var/generation///Model/ResourceModel/StockRecord/Interceptor.php(583): Magento\Framework\Model\ResourceModel\AbstractResource->rollBack()
5 //vendor/magento/module-eav/Model/Entity/AbstractEntity.php(1147): \\Model\ResourceModel\StockRecord\Interceptor->rollBack()
6 //vendor/magento/framework/Interception/Interceptor.php(74): Magento\Eav\Model\Entity\AbstractEntity->save(Object(\\Model\StockRecord))
7 //vendor/magento/framework/Interception/Chain/Chain.php(70): \\Model\ResourceModel\StockRecord\Interceptor->___callParent('save', Array)
8 //vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('\...', 'save', Object(\\Model\ResourceModel\StockRecord\Interceptor), Array, 'clean_cache')
9 //vendor/magento/framework/App/Cache/FlushCacheByTa.php(60): \\Model\ResourceModel\StockRecord\Interceptor->Magento\Framework\Interception{closure}(Object(\\Model\StockRecord))
10 //vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\App\Cache\FlushCacheByTa->aroundSave(Object(\\Model\ResourceModel\StockRecord\Interceptor), Object(Closure), Object(\\Model\StockRecord))
11 //var/generation///Model/ResourceModel/StockRecord/Interceptor.php(429): \\Model\ResourceModel\StockRecord\Interceptor->___callPlugins('save', Array, Array)
12 //vendor/magento/framework/Model/AbstractModel.php(631): \\Model\ResourceModel\StockRecord\Interceptor->save(Object(\\Model\StockRecord))
13 //app/code///Model/StockRecord.php(32): Magento\Framework\Model\AbstractModel->save()
...`
`2016/09/08 14:38:31 [error] 3697#3697: *715 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught exception 'Exception' with message 'User Error: Some transactions have not been committed or rolled back in /
0 [internal function]: Magento\Framework\App\ErrorHandler->handler(256, 'Some transactio...', '/...', 3774, Array)
1 //vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(3774): trigger_error('Some transactio...', 256)
2 [internal function]: Magento\Framework\DB\Adapter\Pdo\Mysql->__destruct()
3 {main}
thrown in //vendor/magento/framework/App/ErrorHandler.php on line 61" while reading upstream, client: 127.0.0.1, server: www.magento22.ru, request: "GET /admin_1jm9bf//stockrecord/edit/id/1/key/44ab1579b65f9844dd0900587fff2ae3fe9308924d2bb2a52f7c078b374e3ed4/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php5.6-fpm.sock:", host: "www.magento22.ru", referrer: "http://www.magento22.ru/admin_1jm9bf//stockrecord/index/key/a5b189dfe48288c212ecfe37c996d21491c3f42dcc6cdca21a48eab6424cb7fb/"`
Important
If disable eav cache ("EAV types and attributes") the problem disappears.
Additional info