我有一个很少扩展的magento站点。主扩展程序是唯一代码的giftcard扩展。我们现在正在使用800K代码进行升级,因此它创造了巨大的流量。问题是现在它正在创造幽灵订单作为付款后 - 在订单必须从预订订单注册到确认的最后一刻 - 它显示表锁定错误。magento超出锁定等待超时sales_flat_order_grid
精确的错误是:
SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: INSERT INTO
sales_flat_order_grid
(entity_id
,status
,store_id
,customer_id
,base_grand_total
,base_total_paid
,grand_total
,total_paid
,increment_id
,base_currency_code
,order_currency_code
,store_name
,created_at
,updated_at
,billing_name
,shipping_name
) SELECTmain_table
.entity_id
,main_table
.status
,main_table
.store_id
,main_table
.customer_id
,main_table
.base_grand_total
,main_table
.base_total_paid
,main_table
.grand_total
,main_table
.total_paid
,main_table
.increment_id
,main_table
.base_currency_code
,main_table
.order_currency_code
,main_table
.store_name
,main_table
.created_at
,main_table
.updated_at
, CONCAT(IFNULL(table_billing_name.firstname, ''), ' ', IFNULL(table_billing_name.middlename, ''), ' ', IFNULL(table_billing_name.lastname, '')) ASbilling_name
, CONCAT(IFNULL(table_shipping_name.firstname, ''), ' ', IFNULL(table_shipping_name.middlename, ''), ' ', IFNULL(table_shipping_name.lastname, '')) ASshipping_name
FROMsales_flat_order
ASmain_table
LEFT JOINsales_flat_order_address
AStable_billing_name
ONmain_table
.billing_address_id
=table_billing_name
.entity_id
LEFT JOINsales_flat_order_address
AStable_shipping_name
ONmain_table
.shipping_address_id
=table_shipping_name
.entity_id
WHERE (main_table.entity_id IN('140650')) ON DUPLICATE KEY UPDATEentity_id
= VALUES(entity_id
),status
= VALUES(status
),store_id
= VALUES(store_id
),customer_id
= VALUES(customer_id
),base_grand_total
= VALUES(base_grand_total
),base_total_paid
= VALUES(base_total_paid
),grand_total
= VALUES(grand_total
),total_paid
= VALUES(total_paid
),increment_id
= VALUES(increment_id
),base_currency_code
= VALUES(base_currency_code
),order_currency_code
= VALUES(order_currency_code
),store_name
= VALUES(store_name
),created_at
= VALUES(created_at
),updated_at
= VALUES(updated_at
),billing_name
= VALUES(billing_name
),shipping_name
= VALUES(shipping_name
)
似乎有效,但没有提到:对于sales_flat_order_grid实体ID 140650。
如果任何人有任何想法,请让我知道可能的解决方案。
如何将代码移至commit_after? 我无法找到订单在网格中保存订单数据的代码。 –