11

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

7 Answers 7

17

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

6

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.

1
  • 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, 2018 at 12:01
4

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.

2
  • This is what it ended up being for me, thanks for your help! Feb 14, 2017 at 20:34
  • what is the solution if we use such external search engines?
    – SIBHI S
    Dec 7, 2017 at 17:37
3

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

1

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.

1

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

1
  • which is the differences between category products and products category index?
    – LucScu
    Jul 28, 2017 at 10:12
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.