When creating a new product and trying to save it, I get the following error message:

Asymmetric transaction rollback error

Has anyone else encountered this? Please share the fix :)

Magento2 Asymmetric transaction rollback error


I was just getting the same error (Asymmetric transaction rollback) when I tried to update some categories after importing data using the Magento data-migration-tool.

A manual reindex fixed the problem for me, to manually reindex your database via ssh just run the following command from your Magento installation:

php bin/magento indexer:reindex

If that doesn't help you might want to take a look at the following bug report: https://github.com/magento/magento2/issues/3720

| improve this answer | |

The issue is resolved and the following are the steps

  1. Reindex by using the following command

    php bin/magento indexer:reindex
  2. run below commands

    rm -rf var/cache/*
    rm -rf var/page_cache/*
    rm -rf var/generation/*
  3. Give permissions to var/generation folder.

| improve this answer | |
  • I got scary error.I have applied this command but actual issue my this error comes after all product remove it so if you have idea reply me this error comes randomly not comes every time. – Rv Singh Nov 2 '18 at 12:01

Also, this error occurs in a situation when you have configured external search engine (Solr or Elasticsearch) and it is unavailable during product/category save.

| improve this answer | |
  • This is what it ended up being for me, thanks for your help! – Joshua Soileau Feb 14 '17 at 20:34
  • what is the solution if we use such external search engines? – SIBHI S Dec 7 '17 at 17:37

It is not a complete solution but it can help you to detect the source of the problem in some cases. Comment out the around save plugin in this class Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Product and you will see the exception error

| improve this answer | |

If you are using flat catalog and reindexing doesn't work, then maybe you just ran out of the MySQL row limitations. You should either turn off flat catalog or reduce the number of attributes which use the used in product listing and the used for sorting in product listing options.

| improve this answer | |

I have another solution for this one issue and it's easy.

Just you can change reindex mode for product related indexer ->Update by schedule. enter image description here

| improve this answer | |
  • which is the differences between category products and products category index? – LucScu Jul 28 '17 at 10:12

I am also facing Asymmetric transaction rollback error issue with MySql InnoDB cluster, So I could not able to save the product and category and when I am print the error message

`SQLSTATE[HY000]: General error: 1787 Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be executed outside transactional context. These statements are also not allowed in a function or trigger because functions and triggers are also considered to be multi-statement transactions., query was: CREATE TEMPORARY TABLE IF NOT EXISTS `catalog_product_index_eav_temp` LIKE `catalog_product_index_eav_tmp

After a long search this commit fix my problem. https://github.com/magento/magento2/commit/4b51ee19353fb39263991f38663ad2fabcb1ce84#diff-08d583954f382bd67bd8f89c7c2345c6

| improve this answer | |

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.