zoukankan      html  css  js  c++  java
  • 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




  • 相关阅读:
    【零基础】极星9.5量化入门二:滚动止盈策略
    【零基础】极星9.5量化入门零:简单的开始
    今天分享下移动端rem 适配
    css超出内容省略号代替。
    今天给大家的小知识点是JS的一种排序方式---快速排序
    highcharts 的基本使用
    zTree jquery-zTree的基本使用
    克隆 JS克隆
    JS判断一个对象是不是数组的几种方式
    js 定时器实现倒计时
  • 原文地址:https://www.cnblogs.com/firmy/p/2738532.html
Copyright © 2011-2022 走看看