mysql the table is full

【0】最终要的还是查看错误日志定位问题啊

【1】InnoDB :: 

【1.1】cannot find a free slot for an undo log

最近数据库数据量及访问频率比较大的两个表出现了the table xxx is full的问题,导致无法写入数据。

查看mysql log发现错误:

InnoDB :: cannot find a free slot for an undo log

原因分析:由于innodb的任何操作都隱含有一個transaction,而出现问题的表由于数据量大操作频繁导致同時有太多事務,以致出现这样的错误。
解决办法:增大配置文件里的参数innodb_log_file_size到1G 。

【1.2】write to file  ./ibdata failed at offset  310 3214654123

  

  由上图可知,有2种可能。

  (1)ibdata已经达到设置上限

  (2)ibdata已经达到OS的文件系统的 大小上限,无法再申请空间扩展。

【2】the table is full

有时候项目好好的就报:数据库操作错误,请联系管理员,发现后台报这个

来说说解决mysql出现"the table is full"的问题:

mysql出现"the table is full"的问题,一般有两个原因:

【2.1】MEMORY (HEAP) storage engine

You are using the MEMORY (HEAP) storage engine; in this case you need to increase the value of the max_heap_table_size system variable. See Section 5.1.3, “Server System Variables”.

ERROR 1114 (HY000) at line 1720: The table 'XXXX' is full

于是就修改Mysql的配置文件my.ini,在[mysqld]下添加/修改两行:
tmp_table_size = 256M
max_heap_table_size = 256M

系统默认是16M,修改完后重启mysql

【2.2】硬盘空间满了,清理硬盘即可

不要被mysql的安装目录所欺骗, 最好亲自去看看数据存放目录是哪

在my.ini  搜索 datadir

看其指向的目录 就是数据存放目录

 使用df -h 查看

我当时的解决方案是,将数据库的磁盘清理了就好了;

我觉得还可以创建临时表,设置表的size

猜你喜欢

转载自www.cnblogs.com/gered/p/12557390.html
今日推荐