0

[2019-01-30 11:52:41] main.CRITICAL: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction, query was: INSERT INTO sales_order_grid (entity_id, status, store_id, store_name, customer_id, base_grand_total, base_total_paid, grand_total, total_paid, increment_id, base_currency_code, order_currency_code, shipping_name, billing_name, created_at, updated_at, billing_address, shipping_address, shipping_information, customer_email, customer_group, subtotal, shipping_and_handling, customer_name, payment_method, total_refunded, signifyd_guarantee_status) SELECT sales_order.entity_id AS entity_id, sales_order.status AS status, sales_order.store_id AS store_id, sales_order.store_name AS store_name, sales_order.customer_id AS customer_id, sales_order.base_grand_total AS base_grand_total, sales_order.base_total_paid AS base_total_paid, sales_order.grand_total AS grand_total, sales_order.total_paid AS total_paid, sales_order.increment_id AS increment_id, sales_order.base_currency_code AS base_currency_code, sales_order.order_currency_code AS order_currency_code, TRIM(CONCAT_WS(' ', IF(sales_shipping_address.firstname <> '', sales_shipping_address.firstname, NULL), IF(sales_shipping_address.lastname <> '', sales_shipping_address.lastname, NULL))) AS shipping_name, TRIM(CONCAT_WS(' ', IF(sales_billing_address.firstname <> '', sales_billing_address.firstname, NULL), IF(sales_billing_address.lastname <> '', sales_billing_address.lastname, NULL))) AS billing_name, sales_order.created_at AS created_at, sales_order.updated_at AS updated_at, TRIM(CONCAT_WS(' ', IF(sales_billing_address.street <> '', sales_billing_address.street, NULL), IF(sales_billing_address.city <> '', sales_billing_address.city, NULL), IF(sales_billing_address.region <> '', sales_billing_address.region, NULL), IF(sales_billing_address.postcode <> '', sales_billing_address.postcode, NULL))) AS billing_address, TRIM(CONCAT_WS(' ', IF(sales_shipping_address.street <> '', sales_shipping_address.street, NULL), IF(sales_shipping_address.city <> '', sales_shipping_address.city, NULL), IF(sales_shipping_address.region <> '', sales_shipping_address.region, NULL), IF(sales_shipping_address.postcode <> '', sales_shipping_address.postcode, NULL))) AS shipping_address, sales_order.shipping_description AS shipping_information, sales_order.customer_email AS customer_email, sales_order.customer_group_id AS customer_group, sales_order.base_subtotal AS subtotal, sales_order.base_shipping_amount AS shipping_and_handling, TRIM(CONCAT_WS(' ', IF(sales_order.customer_firstname <> '', sales_order.customer_firstname, NULL), IF(sales_order.customer_lastname <> '', sales_order.customer_lastname, NULL))) AS customer_name, sales_order_payment.method AS payment_method, sales_order.total_refunded AS total_refunded, signifyd_case.guarantee_disposition AS signifyd_guarantee_status FROM sales_order LEFT JOIN sales_order_address AS sales_shipping_address ON sales_order.shipping_address_id = sales_shipping_address.entity_id LEFT JOIN sales_order_address AS sales_billing_address ON sales_order.billing_address_id = sales_billing_address.entity_id LEFT JOIN sales_order_payment ON sales_order.entity_id = sales_order_payment.parent_id

3
  • And... the question is? Commented Jan 30, 2019 at 14:38
  • @RaulSanchez did you find the fix for this? I'm facing a similar issue. Commented Nov 21, 2020 at 13:38
  • You'd read the posted answer :) Commented Dec 22, 2020 at 7:20

1 Answer 1

2

Sorry I cannot comment..

It seems like you were running two processes that have attempted to lock the same database table? Perhaps you were re-indexing and trying to run an import simultaneously?

We will need more details to help.

Your Answer

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

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