1 Answer
- Newest
- Most votes
- Most comments
0
The RollbackSegmentHistoryListLength metric in Amazon RDS for Aurora refers to the length of the undo log or rollback segment history list. This list contains the before images of the database records and is used during the process of a transaction rollback or to provide a consistent read view for long-running transactions. A high value for RollbackSegmentHistoryListLength may indicate:
- Long-Running Transactions: If you have long-running transactions in your database, they could be holding onto undo logs for a long time, causing the length of the history list to increase.
- High Rate of DML Operations: A high rate of Data Manipulation Language (DML) operations (INSERT, UPDATE, DELETE) could generate a large number of undo logs, increasing the length of the history list.
- Resource Intensive Queries: Queries that are resource-intensive or not properly optimized could also be causing this issue.
Here's what you can do to resolve this issue:
- Identify Long-Running Transactions: Use performance insights, slow query logs, or the SHOW FULL PROCESSLIST command to identify any long-running transactions and either terminate them or optimize them to run faster.
- Optimize DML Operations: If your application performs a lot of DML operations, consider optimizing them. For example, batch your INSERTs, UPDATEs, and DELETEs, where possible.
- Tune Database Parameters: There are some InnoDB parameters like innodb_max_undo_log_size, innodb_purge_threads, and innodb_purge_batch_size which could help control the size of the undo log. However, before making any changes, make sure to thoroughly test in a non-production environment as these could have other impacts on your database performance.
- Monitor and Alert: Finally, set up CloudWatch Alarms to alert you when the RollbackSegmentHistoryListLength metric crosses a threshold that you consider critical for your application. This way, you can intervene promptly if the issue arises.
Relevant content
- asked 21 days ago
- How can I monitor daily EstimatedCharges and trigger a CloudWatch alarm based on my usage threshold?AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago