1114 aws runtime_error ai_generated true

MySQL 服务器已断开:错误 1114 (HY000) 表 '/rdsdbdata/tmp/#sql_xxx' 已满

MySQL server has gone away: error 1114 (HY000) The table '/rdsdbdata/tmp/#sql_xxx' is full

ID: aws/rds-storage-full

其他格式: JSON · Markdown 中文 · English
85%修复率
82%置信度
1证据数
2023-08-20首次发现

版本兼容性

版本状态引入弃用备注
rds-mysql-8.0.35 active
rds-mariadb-10.6.16 active

根因分析

RDS 实例存储已耗尽,导致临时表或数据文件写入失败;通常是由于分配的存储不足或未优化的查询生成了大量临时表。

English

RDS instance storage is exhausted, causing temporary tables or data files to fail writes; often due to insufficient allocated storage or unoptimized queries generating large temp tables.

generic

官方文档

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Troubleshooting.html#CHAP_Troubleshooting.StorageFull

解决方案

  1. 修改 RDS 实例以增加分配的存储:`aws rds modify-db-instance --db-instance-identifier mydb --allocated-storage 200 --apply-immediately`
  2. 清理旧数据或日志:删除未使用的表,使用 `CALL mysql.rds_rotate_binlog;` 轮换二进制日志或减少 binlog 保留时间。
  3. 优化查询以使用索引并避免大型临时表;设置 tmp_table_size 和 max_heap_table_size 以允许内存临时表。

无效尝试

常见但无效的做法:

  1. Restart the RDS instance to clear temporary tables 70% 失败

    Restarting may free temp space temporarily, but if storage is full, the root cause (disk space) persists and queries will fail again.

  2. Increase innodb_buffer_pool_size to reduce disk I/O 85% 失败

    Buffer pool size affects memory, not disk storage; it won't free up space on the volume.