Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction by Magento position

We have a problem in our Magento shop when we try to set the position of the products in a category from manage categories. When we try to save a product after changing the position in "category products" we get the following failure:

SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

Does anyone know how to solve this?

like image 241
Coen Avatar asked Jan 10 '14 09:01

Coen


1 Answers

The error occurs most probably because you have the product position index set to auto and Magento tries to rebuild the index along with the product save.
Go to System->Index Management and set the indexes related to catalog to 'manual'.
Then set the product positions and when you are done rebuild the indexes manually.

like image 129
Marius Avatar answered Nov 06 '22 22:11

Marius