MySQL 查询表已满

标签 mysql database-replication

我在主/从复制上找不到问题的根源。

今天我正在更新Master,突然从Slave收到以下错误

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 

这不是磁盘问题,从站是主站的精确复制

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

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

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

最佳答案

该手册不排除 full disk 的可能性.

If a table-full error occurs, it may be that the disk is full or that the table has reached its maximum size. The effective maximum table size for MySQL databases is usually determined by operating system constraints on file sizes, not by MySQL internal limits.

但是因为在发布这个问题之前已经检查过这一点。因此唯一的其他可能性是已达到最大表大小。

关于MySQL 查询表已满,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38868666/

相关文章:

c# - 从 C# 应用程序调试 MySQL 连接问题

php - 从 $GET 将 ip 插入 mysql php

php - 如何让表头和表尾出现在每一页上?

mongodb - Nodejs/ Mongoose : connect to db that's using replica sets

mysql - Percona 状态转移失败

不改变server-id属性的Mysql主从复制

mysql 慢日志查询

mysql - 主键重复输入

php - mysqlnd_ms 替代 php7

sql-server - SQL Server 复制问题