[英]Magento 2.4.5 - Deadlock on table catalog_category_product_index_store1_replica and index stuck
The index "catalog_product_category" is stuck and the table "catalog_category_product_index_store1" is locked.索引“catalog_product_category”被卡住,表“catalog_category_product_index_store1”被锁定。
This is crashing down our website.这正在崩溃我们的网站。
What we should do to have our indexes running correctly again and identify why it got stuck.我们应该怎么做才能让我们的索引再次正常运行并确定它卡住的原因。
The paliative solution until now is: Reboot our application and RDS.到目前为止的姑息解决方案是:重新启动我们的应用程序和 RDS。
Find out why Magento is TRUNCATEing
a table.找出TRUNCATEing
正在截断表的原因。 If possible, avoid using whatever is involved.如果可能,请避免使用涉及的任何内容。 If that is not possible, then jettison Magento.如果那不可能,则放弃 Magento。
A possible situation is "replacing" the contents of a table.一种可能的情况是“替换”表格的内容。 For example, if you get a new set of values for catelog...replica
, you could use TRUNCATE
, but this is much better:例如,如果您为catelog...replica
获得一组新值,则可以使用TRUNCATE
,但这样会好得多:
CREATE TABLE new LIKE catelog...replica;
load the new data into `new`
RENAME TABLE catelog...replica TO old,
new TO catelog...replica;
DROP TABLE old;
No TRUNCATE
, no downtime (except a tiny amount for the RENAME
), no time during which the table is empty (and being refilled), etc.没有TRUNCATE
,没有停机时间(除了少量的RENAME
),没有表为空(和重新填充)的时间,等等。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.