| Bug #119396 | Increase in undo log size , slower purging and no truncation even after restart | ||
|---|---|---|---|
| Submitted: | 14 Nov 10:58 | Modified: | 14 Nov 15:12 |
| Reporter: | Azar Md | Email Updates: | |
| Status: | Open | Impact on me: | |
| Category: | MySQL Server: InnoDB storage engine | Severity: | S1 (Critical) |
| Version: | 8.0.40 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | InnDB, undo log purge, undo space | ||
[14 Nov 10:58]
Azar Md
[14 Nov 14:44]
MySQL Verification Team
Suggest you check for long running XA or transactions. XA RECOVER; SELECT * FROM information_schema.innodb_trx ORDER BY trx_started; if an XA trx is there for long, then do a XA ROLLBACK for it.
[14 Nov 14:46]
MySQL Verification Team
related: https://bugs.mysql.com/bug.php?id=54455 (innodb needs a way to limit consistent read snapshot age)
[14 Nov 14:50]
MySQL Verification Team
A few things you could tune in purge. https://dev.mysql.com/doc/refman/8.0/en/innodb-purge-configuration.html however we cant help with that in context of the bug report. IF you've got time for downtime and there are no XA trx, then SET GLOBAL innodb_fast_shutdown=0; and restart. It'll take a while, but purge should catch up.
[14 Nov 15:12]
Azar Md
mysql> SELECT * FROM information_schema.innodb_trx ORDER BY trx_started; Empty set (0.00 sec) mysql> XA RECOVER; Empty set (0.00 sec) The result of SELECT * FROM information_schema.innodb_trx is empty, and XA RECOVER also returns an empty set. We have already tried all the recommended suggestions to speed up the purge process, but there is still no major improvement. A MySQL restart should normally clear the manually created undo tablespaces, but that is not happening. Is this a bug in this version? Is there any better solution to overcome this issue? We have not yet tried the shutdown query you shared, because we need to know how long the downtime would be, and we cannot afford a long downtime window.
