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 :)
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI 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
The issue is resolved and the following are the steps
Reindex by using the following command
php bin/magento indexer:reindex
run below commands
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf var/generation/*
Give permissions to var/generation
folder.
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.
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
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.
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.
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