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

- **ID:** `aws/rds-storage-full`
- **Domain:** aws
- **Category:** runtime_error
- **Error Code:** `1114`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

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.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| rds-mysql-8.0.35 | active | — | — |
| rds-mariadb-10.6.16 | active | — | — |

## Workarounds

1. **Modify RDS instance to increase allocated storage: `aws rds modify-db-instance --db-instance-identifier mydb --allocated-storage 200 --apply-immediately`** (90% success)
   ```
   Modify RDS instance to increase allocated storage: `aws rds modify-db-instance --db-instance-identifier mydb --allocated-storage 200 --apply-immediately`
   ```
2. **Clean up old data or logs: delete unused tables, truncate binary logs with `CALL mysql.rds_rotate_binlog;` or reduce binlog retention.** (75% success)
   ```
   Clean up old data or logs: delete unused tables, truncate binary logs with `CALL mysql.rds_rotate_binlog;` or reduce binlog retention.
   ```
3. **Optimize queries to use indexes and avoid large temp tables; set tmp_table_size and max_heap_table_size to allow in-memory temp tables.** (65% success)
   ```
   Optimize queries to use indexes and avoid large temp tables; set tmp_table_size and max_heap_table_size to allow in-memory temp tables.
   ```

## Dead Ends

- **Restart the RDS instance to clear temporary tables** — Restarting may free temp space temporarily, but if storage is full, the root cause (disk space) persists and queries will fail again. (70% fail)
- **Increase innodb_buffer_pool_size to reduce disk I/O** — Buffer pool size affects memory, not disk storage; it won't free up space on the volume. (85% fail)
