Skip to content

Serialization failure: 1213 Deadlock found catalog_product_bundle_stock_index

I’m encountering this error repeatedly and haven’t been able to resolve it.

Has anyone else experienced this or have any suggestions for a fix?

SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction, query was: INSERT INTO `catalog_product_bundle_stock_index` SELECT `product`.`entity_id`, `cis`.`website_id`, `cis`.`stock_id`, `bo`.`option_id`, MAX(IF(e.required_options = 0, i.stock_status, 0)) AS `status` FROM `catalog_product_entity` AS `product`

INNER JOIN catalog_product_bundle_option AS bo ON bo.parent_id = product.entity_id
CROSS JOIN cataloginventory_stock AS cis
LEFT JOIN catalog_product_bundle_selection AS bs ON bs.option_id = bo.option_id
LEFT JOIN cataloginventory_stock_status AS i ON i.product_id = bs.product_id AND i.website_id = cis.website_id AND i.stock_id = cis.stock_id
LEFT JOIN catalog_product_entity AS e ON e.entity_id = bs.product_id WHERE (product.entity_id IN(1600, 1601, 1603, 1604, 1605)) AND (bo.required = 0) GROUP BY product.entity_id,
cis.website_id,
cis.stock_id,
bo.option_id HAVING (MAX(IF(e.required_options = 0, i.stock_status, 0)) = 1) ON DUPLICATE KEY UPDATE stock_status = VALUES(stock_status)

Any help would be greatly appreciated. Thanks in advance!