开发者

RDS Database storage runs out of space

I just upgraded my RDS Storage from 10GB to 20GB and after a couple of days RDS says Storage full again.

Running this query in MySQL workbench against the same DB says the DB size is 43MB

SELECT table_schema "database_name", 
sum( data_length + index_length ) / 1开发者_如何学C024 / 
1024 "Data Base Size in MB", 
sum( data_free )/ 1024 / 1024 "Free Space in MB" 
FROM information_schema.TABLES 
GROUP BY table_schema ;  

So is there something going on with the logs that MySQL creates or the backups etc that might fill up my storage space on the production servers.

Please help.


Its probably mysql.slow_log table which takes so much space.
You can remove slow logs by executing following sql:

CALL mysql.rds_rotate_slow_log


There are several types of logs in mysql. Look at http://dev.mysql.com/doc/refman/5.1/en/server-logs.html. But I advice to look at slow query logs. If you have a lot of slow queries your log will increase fast. Also check option --log-queries-not-using-indexes. Maybe you log all your queries without indexes.


Your System tablespace might be consuming the space.

You can check it using the query below:

select TABLESPACE_NAME,FILE_NAME,FREE_EXTENTS,TOTAL_EXTENTS,EXTENT_SIZE
from INFORMATION_SCHEMA.files 
where TABLESPACE_NAME in ('innodb_system','innodb_temporary');

Try to reboot your database. It should solve the problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜