magento / data-migration-tool

Magento Data Migration Tool
https://devdocs.magento.com/guides/v2.3/migration/bk-migration-guide.html
Open Software License 3.0
338 stars 199 forks source link

After migrate: "Asymmetric transaction rollback" error on product save #322

Closed friimaind closed 7 years ago

friimaind commented 7 years ago

I get "Asymmetric transaction rollback" when trying to save an imported product or when I try to create a new one.

The odd thing is that the save seems to be happening properly.

image

This is the exception.log

[2017-06-16 15:32:15] main.CRITICAL: Exception: Asymmetric transaction rollback. in /var/www/www.mymagento2.it/public_html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:278 Stack trace:

0 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Model/ResourceModel/AbstractResource.php(99): Magento\Framework\DB\Adapter\Pdo\Mysql->rollBack()

1 /var/www/www.mymagento2.it/public_html/var/generation/Magento/Catalog/Model/ResourceModel/Product/Interceptor.php(791): Magento\Framework\Model\ResourceModel\AbstractResource->rollBack()

2 /var/www/www.mymagento2.it/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(57): Magento\Catalog\Model\ResourceModel\Product\Interceptor->rollBack()

3 /var/www/www.mymagento2.it/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(24): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Product->addCommitCallback(Object(Magento\Catalog\Model\ResourceModel\Product\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Product\Interceptor))

4 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Product->aroundSave(Object(Magento\Catalog\Model\ResourceModel\Product\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Product\Interceptor))

5 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'save', Object(Magento\Catalog\Model\ResourceModel\Product\Interceptor), Array, 'clean_cache')

6 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/App/Cache/FlushCacheByTags.php(71): Magento\Catalog\Model\ResourceModel\Product\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Catalog\Model\Product\Interceptor))

7 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\App\Cache\FlushCacheByTags->aroundSave(Object(Magento\Catalog\Model\ResourceModel\Product\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Product\Interceptor))

8 /var/www/www.mymagento2.it/public_html/var/generation/Magento/Catalog/Model/ResourceModel/Product/Interceptor.php(273): Magento\Catalog\Model\ResourceModel\Product\Interceptor->___callPlugins('save', Array, Array)

9 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Model/AbstractModel.php(631): Magento\Catalog\Model\ResourceModel\Product\Interceptor->save(Object(Magento\Catalog\Model\Product\Interceptor))

10 /var/www/www.mymagento2.it/public_html/var/generation/Magento/Catalog/Model/Product/Interceptor.php(2364): Magento\Framework\Model\AbstractModel->save()

11 /var/www/www.mymagento2.it/public_html/vendor/magento/module-catalog/Controller/Adminhtml/Product/Save.php(110): Magento\Catalog\Model\Product\Interceptor->save()

12 /var/www/www.mymagento2.it/public_html/var/generation/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(24): Magento\Catalog\Controller\Adminhtml\Product\Save->execute()

13 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/App/Action/Action.php(102): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->execute()

14 /var/www/www.mymagento2.it/public_html/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))

15 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))

16 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callParent('dispatch', Array)

17 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor), Array, 'adminAuthentica...')

18 /var/www/www.mymagento2.it/public_html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

19 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

20 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor), Array, 'adminMassaction...')

21 /var/www/www.mymagento2.it/public_html/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

22 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

23 /var/www/www.mymagento2.it/public_html/var/generation/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(39): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callPlugins('dispatch', Array, Array)

24 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

25 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))

26 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)

27 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')

28 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

29 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

30 /var/www/www.mymagento2.it/public_html/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)

31 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

32 /var/www/www.mymagento2.it/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()

33 /var/www/www.mymagento2.it/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))

34 {main} [] []

friimaind commented 7 years ago

I found the problem:

bin/magento indexer:status

pointed me that "Catalog Search:" reindex was running.

I stopped the reindex with:

bin/magento indexer:reset catalogsearch_fulltext

Running only the reindex of this module shows me a fatal error:

Fatal error: Maximum function nesting level of '100' reached, aborting

So I edited my php.ini adding:

xdebug.max_nesting_level = 10000

Now, I can run all the reindex and I can save products :+1:

vishalgchetu commented 5 years ago

I am getting “Asymmetric transaction rollback.” error while updating product with CRON job ,

Magento version : 2.1.5
I have also grammatically reindex during product update via CRON job but still not solve .

Can you please help me .