title: "Storage-full " problem with aws RDS MYSQL read replica
body: <p>I have one master RDS instance of 50 GB storage and created a read replica of the master DB with the same configuration.</p>
  
  <p>I use this read replica only for <code>SELECT</code> operations nothing else. But suddenly I got the <strong>storage full</strong> 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?</p>
  
  <p>Getting below error when executing the complex query(inner, join, group):-</p>
  
  <p>ERROR 3 (HY000): Error writing file '/rdsdbdata/tmp/MY7U2XRf' (Errcode: 28 - No space left on device)</p>
  
  <p>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.</p>
  
  <p>Checked the free size with below command of both Master and replica Db instances, it's almost the same.</p>
  
  <p><strong>MySQL:</strong> </p>
  
  <pre class="lang-sql prettyprint-override"><code>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;
  </code></pre>
  
  <p>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.</p>