MySQL查询

时间:2016-08-10 08:59:40

标签: mysql database-replication

我无法在主/从复制中找到问题的根源。

今天我正在更新Master并突然从奴隶

得到以下错误
Error 'The table 'caching_api' is full' on query.

Query: '
ALTER TABLE `caching_api`
ADD UNIQUE INDEX `id` (`id`) USING BTREE ,
ADD INDEX `search` (`component`, `method`) USING BTREE 

它不是磁盘问题,Slave是Master的完全复制

enter image description here

enter image description here

enter image description here

和my.cnf配置:

[mysqld]
#
# * Basic Settings
#
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /data/mysql
tmpdir          = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking

key_buffer              = 16M
max_allowed_packet      = 128M
thread_stack            = 192K
thread_cache_size       = 64

table_open_cache        = 3000
join_buffer_size        = 128k

# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
max_connections        = 4000
wait_timeout           = 150
interactive_timeout    = 30
innodb_buffer_pool_size = 25G
innodb_log_file_size    = 1G

innodb_buffer_pool_instances   = 10
tmp_table_size                 = 256M
max_heap_table_size            = 256M
innodb_flush_log_at_trx_commit = 2
query_cache_limit              = 64M
query_cache_size               = 256M
relay_log_space_limit          = 10G
server-id                      = 2
relay-log                      = /var/log/mysql/mysqld-relay-bin
expire_logs_days               = 1
max_binlog_size                = 100M
slave-skip-errors              = 1062,1054

[mysqldump]
quick
quote-names


[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer              = 16M

更新评论中的问题: enter image description here

enter image description here

enter image description here

当我尝试直接在SLAVE上运行查询时:

enter image description here

caching_api表状态

enter image description here

从属磁盘信息

enter image description here

ibdata1约36GB

enter image description here

ulimit -a

enter image description here

1 个答案:

答案 0 :(得分:2)

本手册不排除full disk的可能性。

  

如果发生表满的错误,则可能是磁盘已满或者已满   表格已达到最大尺寸。有效的最大表   MySQL数据库的大小通常由操作系统决定   对文件大小的约束,而不是MySQL内部限制。

但是在发布此问题之前已经检查过了。所以唯一的另一个可能性就是达到了最大表大小。