我在 Amazon RDS 上有一个 MySQL 实例,有 6GB 的存储空间。安装到此实例中的所有数据库总计 500MB。
今天服务器没有可用空间。我该如何识别问题?
这是日志错误:
2015-12-26 02:21:01 6356 [ERROR] Failed to write to mysql.slow_log: Error writing file './mysql/slow_log.CSV' (Errcode: 28 - No space left on device)
2015-12-26 02:21:54 6356 [ERROR] Failed to write to mysql.slow_log: Error writing file './mysql/slow_log.CSV' (Errcode: 28 - No space left on device)
2015-12-26 02:21:58 6356 [ERROR] Failed to write to mysql.slow_log: Error writing file './mysql/slow_log.CSV' (Errcode: 28 - No space left on device)
2015-12-26 02:21:58 6356 [ERROR] Failed to write to mysql.slow_log: Error writing file './mysql/slow_log.CSV' (Errcode: 28 - No space left on device)
2015-12-26 02:22:06 6356 [ERROR] Failed to write to mysql.slow_log: Error writing file './mysql/slow_log.CSV' (Errcode: 28 - No space left on device)
2015-12-26 02:25:53 6356 [Warning] Disk is full writing '/rdsdbdata/log/binlog/mysql-bin-changelog.~rec~' (Errcode: 28 - No space left on device). Waiting for someone to free space...
2015-12-26 02:25:53 6356 [Warning] Retry in 60 secs. Message reprinted in 600 secs
2015-12-26 02:25:58 6356 [ERROR] Failed to write to mysql.slow_log: Error writing file './mysql/slow_log.CSV' (Errcode: 28 - No space left on device)
2015-12-26 02:26:04 6356 [ERROR] Failed to write to mysql.slow_log: Error writing file './mysql/slow_log.CSV' (Errcode: 28 - No space left on device)
2015-12-26 02:27:57 6356 [ERROR] Failed to write to mysql.slow_log: Error writing file './mysql/slow_log.CSV' (Errcode: 28 - No space left on device)
2015-12-26 02:28:59 6356 [Warning] Disk is full writing '/rdsdbdata/log/binlog/mysql-bin-changelog.127870' (Errcode: 28 - No space left on device). Waiting for someone to free space...
2015-12-26 02:28:59 6356 [Warning] Retry in 60 secs. Message reprinted in 600 secs
2015-12-26 02:30:08 6356 [ERROR] Failed to write to mysql.slow_log: Error writing file './mysql/slow_log.CSV' (Errcode: 28 - No space left on device)
2015-12-26 02:32:01 6356 [ERROR] Failed to write to mysql.slow_log: Error writing file './mysql/slow_log.CSV' (Errcode: 28 - No space left on device)
2015-12-26 02:33:47 6356 [ERROR] Failed to write to mysql.slow_log: Error writing file './mysql/slow_log.CSV' (Errcode: 28 - No space left on device)
2015-12-26 02:35:32 6356 [ERROR] Failed to write to mysql.slow_log: Error writing file './mysql/slow_log.CSV' (Errcode: 28 - No space left on device)
02:35:33 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=93
max_threads=64725
thread_count=21
connection_count=21
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 34042518 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x2ac7490dc000
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 2ac6fbb51ec0 thread_stack 0x40000
/rdsdbbin/mysql/bin/mysqld(my_print_stacktrace+0x2c)[0x8c411c]
/rdsdbbin/mysql/bin/mysqld(handle_fatal_signal+0x491)[0x669c81]
/lib64/libpthread.so.0(+0xf5b0)[0x2ac6765455b0]
/rdsdbbin/mysql/bin/mysqld(mi_extra+0x1a)[0x8f9aca]
/rdsdbbin/mysql/bin/mysqld(_ZN13QEP_tmp_table8end_sendEv+0x4b)[0x6c659b]
/rdsdbbin/mysql/bin/mysqld(_Z13sub_select_opP4JOINP13st_join_tableb+0x37)[0x6c1057]
/rdsdbbin/mysql/bin/mysqld(_ZN4JOIN4execEv+0x2d0)[0x6bff00]
/rdsdbbin/mysql/bin/mysqld(_Z12mysql_selectP3THDP10TABLE_LISTjR4ListI4ItemEPS4_P10SQL_I_ListI8st_orderESB_S7_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x275)[0x7066f5]
/rdsdbbin/mysql/bin/mysqld(_Z13handle_selectP3THDP13select_resultm+0x175)[0x706f65]
/rdsdbbin/mysql/bin/mysqld[0x5781b6]
2015-12-26 08:46:47 22860 [Warning] Buffered warning: Changed limits: max_open_files: 65535 (requested 500000)
2015-12-26 08:46:47 22860 [Warning] Buffered warning: Changed limits: max_connections: 64725 (requested 100000)
2015-12-26 08:46:47 22860 [Warning] Buffered warning: Changed limits: table_cache: 400 (requested 2000)
2015-12-26 08:46:47 22860 [Note] Plugin 'FEDERATED' is disabled.
2015-12-26 08:46:47 22860 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-12-26 08:46:47 22860 [Note] InnoDB: The InnoDB memory heap is disabled
2015-12-26 08:46:47 22860 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-12-26 08:46:47 22860 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-12-26 08:46:47 22860 [Note] InnoDB: Using Linux native AIO
2015-12-26 08:46:48 22860 [Note] InnoDB: Using CPU crc32 instructions
2015-12-26 08:46:48 22860 [Note] InnoDB: Initializing buffer pool, size = 2.6G
2015-12-26 08:46:48 22860 [Note] InnoDB: Completed initialization of buffer pool
2015-12-26 08:46:48 22860 [Note] InnoDB: Highest supported file format is Barracuda.
2015-12-26 08:46:48 22860 [Note] InnoDB: The log sequence numbers 72561175710 and 72561175710 in ibdata files do not match the log sequence number 537632317431 in the ib_logfiles!
2015-12-26 08:46:48 22860 [Note] InnoDB: Database was not shutdown normally!
2015-12-26 08:46:48 22860 [Note] InnoDB: Starting crash recovery.
2015-12-26 08:46:48 22860 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-12-26 08:46:50 22860 [Note] InnoDB: Restoring possible half-written data pages
2015-12-26 08:46:50 22860 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Transaction 3044017258 was in the XA prepared state.
InnoDB: Transaction 3044017264 was in the XA prepared state.
InnoDB: Transaction 3044017282 was in the XA prepared state.
InnoDB: Transaction 3044017402 was in the XA prepared state.
InnoDB: Transaction 3044017405 was in the XA prepared state.
InnoDB: Transaction 3044017407 was in the XA prepared state.
InnoDB: 6 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 0 row operations to undo
InnoDB: Trx id counter is 3044018176
InnoDB: Last MySQL binlog file position 0 1428443, file name mysql-bin-changelog.127870
2015-12-26 08:46:50 22860 [Note] InnoDB: 128 rollback segment(s) are active.
InnoDB: Starting in background the rollback of uncommitted transactions
2015-12-26 08:46:50 2b2701200700 InnoDB: Rollback of non-prepared transactions completed
2015-12-26 08:46:50 22860 [Note] InnoDB: Waiting for purge to start
2015-12-26 08:46:50 22860 [Note] InnoDB: 5.6.19 started; log sequence number 537632317431
2015-12-26 08:46:50 22860 [Note] Recovering after a crash using /rdsdbdata/log/binlog/mysql-bin-changelog
2015-12-26 08:46:51 22860 [ERROR] Error in Log_event::read_log_event(): 'read error', data_len: 1427877, event_type: 2
2015-12-26 08:46:51 22860 [Note] Starting crash recovery...
2015-12-26 08:46:51 2b262d066980 InnoDB: Starting recovery for XA transactions...
2015-12-26 08:46:51 2b262d066980 InnoDB: Transaction 3044017407 in prepared state after recovery
2015-12-26 08:46:51 2b262d066980 InnoDB: Transaction contains changes to 1 rows
2015-12-26 08:46:51 2b262d066980 InnoDB: Transaction 3044017405 in prepared state after recovery
2015-12-26 08:46:51 2b262d066980 InnoDB: Transaction contains changes to 1 rows
2015-12-26 08:46:51 2b262d066980 InnoDB: Transaction 3044017402 in prepared state after recovery
2015-12-26 08:46:51 2b262d066980 InnoDB: Transaction contains changes to 1 rows
2015-12-26 08:46:51 2b262d066980 InnoDB: Transaction 3044017282 in prepared state after recovery
2015-12-26 08:46:51 2b262d066980 InnoDB: Transaction contains changes to 1 rows
2015-12-26 08:46:51 2b262d066980 InnoDB: Transaction 3044017264 in prepared state after recovery
2015-12-26 08:46:51 2b262d066980 InnoDB: Transaction contains changes to 8 rows
2015-12-26 08:46:51 2b262d066980 InnoDB: Transaction 3044017258 in prepared state after recovery
2015-12-26 08:46:51 2b262d066980 InnoDB: Transaction contains changes to 2 rows
2015-12-26 08:46:51 2b262d066980 InnoDB: 6 transactions in prepared state after recovery
2015-12-26 08:46:51 22860 [Note] Found 6 prepared transaction(s) in InnoDB
2015-12-26 08:46:51 22860 [Note] Crash recovery finished.
2015-12-26 08:46:51 22860 [Note] Crashed binlog file /rdsdbdata/log/binlog/mysql-bin-changelog.127870 size is 1671168, but recovered up to 1428443. Binlog trimmed to 1428443 bytes.
2015-12-26 08:46:51 22860 [Note] Server hostname (bind-address): '*'; port: 3306
2015-12-26 08:46:51 22860 [Note] IPv6 is available.
2015-12-26 08:46:51 22860 [Note] - '::' resolves to '::';
2015-12-26 08:46:51 22860 [Note] Server socket created on IP: '::'.
2015-12-26 08:46:51 22860 [Note] Event Scheduler: Loaded 0 events
2015-12-26 08:46:51 22860 [Note] /rdsdbbin/mysql/bin/mysqld: ready for connections.
Version: '5.6.19-log' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server (GPL)