Help Center/ Relational Database Service/ Troubleshooting/ RDS for MySQL/ Performance Issues/ Read Replica Uses Far More Storage Than the Primary Instance
Updated on 2023-03-06 GMT+08:00

Read Replica Uses Far More Storage Than the Primary Instance

Scenario

The storage usage of an RDS for MySQL read replica was, for example, 195 GB higher than that of the primary DB instance.

Troubleshooting

Check the transactions running on the read replica.

As shown in the preceding figure, there was a long transaction started a day ago that has still not committed. The undo logs accumulated for almost a whole day and were not cleared, which takes up a lot of storage.

Solution

  • Method 1: Wait until the transaction is committed. After that, the undo logs will be cleared, releasing storage space.
  • Method 2: Kill the corresponding session to stop the long transaction.