table xxxx is full 报警问题处理

遇到一个蛋碎的问题,/usr/local/mysql/bin/mysqld: The table 't_role_online' is full
查看一下表的状态
 
| table_schema  | table_name         | total_size_mb | data_used_mb | data_free_mb | TABLE_ROWS | ENGINE | ROW_FORMAT | pct_used |
 
+---------------+--------------------+---------------+--------------+--------------+------------+--------+------------+----------+
 
| schema-name1 | pre_common_session |          2.97 |         2.97 |         0.00 |          1 | MEMORY | Fixed      |   100.00 |
 
| schema-name2 | pre_common_session |          0.05 |         0.05 |         0.00 |        165 | MEMORY | Fixed      |   100.00 |
 
| schema-name3 | pre_common_session |          2.97 |         2.96 |         0.00 |          7 | MEMORY | Fixed      |    99.97 |
 
| schema-name4   | pre_common_session |          2.97 |         2.97 |         0.00 |          1 | MEMORY | Fixed      |   100.00 |
 
+---------------+--------------------+---------------+--------------+--------------+------------+--------+------------+----------+
4 rows in set (0.36 sec)
 
只有红色部分是特别差异.基于这点,我们去查看该表结构
mysql> show table status like 'pre_common_session'\G
 
*************************** 1. row ***************************
 
           Name: pre_common_session
 
         Engine: MEMORY
 
        Version: 10
 
     Row_format: Fixed
 
           Rows: 153
 
Avg_row_length: 68
 
    Data_length: 22120
 
Max_data_length: 10200
 
   Index_length: 25760
 
      Data_free: 816
 
Auto_increment: NULL
 
    Create_time: NULL
 
    Update_time: NULL
 
     Check_time: NULL
 
      Collation: gbk_chinese_ci
 
       Checksum: NULL
 
 Create_options: max_rows=150  ===》这个设置会对mysql最大空间计算产生影响,但并不是说表最大到150就不能再往上了。
 
但是到150以后,会很容易出现table XXXX FULL 的错误
 
而该表行数是165.所以很容易出现这个错误。
 
而通常出现table xxxx is full 就需要去看disk/max_heap_table_size 这两个是否到达上限了
 
解决如下
mysql> alter table pre_common_session max_rows=200;
 
Query OK, 177 rows affected (0.00 sec)
 
Records: 177  Duplicates: 0  Warnings: 0




转载于:https://www.cnblogs.com/firmy/archive/2012/10/25/2738532.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值