1
votes

I have one master RDS instance of 50 GB storage and created a read replica of the master DB with the same configuration.

I use this read replica only for SELECT operations nothing else. But suddenly I got the storage full problem with the read replica DB. Master Db is working properly, how is it possible if the size is same but replica DB's size is full?

Getting below error when executing the complex query(inner, join, group):-

ERROR 3 (HY000): Error writing file '/rdsdbdata/tmp/MY7U2XRf' (Errcode: 28 - No space left on device)

In AWS Console, The slave DB status is "Storage-full" and an event log message is : The free storage capacity for DB Instance: example-slave is low at 1% of the provisioned storage [Provisioned Storage: 49.07 GB, Free Storage: 527.80 MB]. You may want to increase the provisioned storage to address this issue.

Checked the free size with below command of both Master and replica Db instances, it's almost the same.

MySQL:

SELECT table_schema, ROUND(SUM(data_length+index_length)/1024/1024/1024,2) "size in GB" 
FROM information_schema.tables 
GROUP BY 1 
ORDER BY 2 DESC;

Master DB's space is used 23.86 GB out of 50 GB and Slave DB's space is used 24 GB out of 50 GB.

1
Could be InnoDB logs exhausted the space.tadman
this question might better be addressed to dba.stackexchange.comspencer7593
What's the actual difference in total used space between the master and the slave?jordanm
@jordanm - Master DB's space is used 23.86 GB out of 50 GB and Slave DB's space is used 24 GB out of 50 GB.Rajeev
@tadman - How to check that InnoDB logs exhausted the space? I checked in parameter group innodb_file_per_table is 1.Rajeev

1 Answers

0
votes

What probably happened is that you enabled the auto-scaling in the master but not in the slave/read-replica