Sample Header Ad - 728x90

DROP and TRUNCATE table on MySQL 8.0.35 freezes the DB

1 vote
1 answer
154 views
We recently upgraded from MySQL 5.7 to MySQL 8.0.35 in AWS RDS. There is a log table that services write to and we rotate it daily, using RENAME TABLE command. Later when we perform a DROP or TRUNCATE on this table (~10-15 GB size) the DB freezes for 5-6 minutes. During those minutes * DB does not report any metrics * Clients get timeouts and disconnect * OS metrics show significant drop in IO and CPU Table
CREATE TABLE test_test_test (
  rowId bigint NOT NULL DEFAULT '0',
  ruId varchar(200) NOT NULL,
  sessionId varchar(200) NOT NULL,
  transSource varchar(255) DEFAULT NULL,
  dcsnType varchar(75) DEFAULT NULL,
  dcsnTypeManual varchar(75) DEFAULT NULL,
  dcsnReason varchar(255) DEFAULT NULL,
  dcsnPlcRsn varchar(100) DEFAULT NULL,
  firstDcnRule varchar(100) DEFAULT NULL,
  payload text,
  insertTime timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  status varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
## OS Metrics Notice the DB metrics (bottom 3 graphs) are extrapolated (no measurements) during 07:33-07:41 enter image description here The table is not used by any services when we run DROP or TRUNCATE Would appreciate any theories, explanations or directions to explore. Thanks
Asked by AlexV (125 rep)
Feb 18, 2024, 10:57 AM
Last activity: Jul 10, 2025, 08:02 PM