ibtmp1文件过大
2018-08-28 11:56
2915 查看
有个数据库发现磁盘告警 已经100% 经过排查发现数据库的data目录下有个
ibtmp1是个什么东西呢?查看官方文档后发现The temporary tablespace is a tablespace for non-compressed InnoDB temporary tables and related objects. The configuration option, innodb_temp_data_file_path, defines a relative path for the temporary tablespace data file. If innodb_temp_data_file_path is not defined, a single auto-extending 12MB data file named ibtmp1 is created in the data directory. The temporary tablespace is recreated on each server start and receives a dynamically generated space ID, which helps avoid conflicts with existing space IDs. The temporary tablespace cannot reside on a raw device. Startup is refused if the temporary tablespace cannot be created.The temporary tablespace is removed on normal shutdown or on an aborted initialization. The temporary tablespace is not removed when a crash occurs. In this case, the database administrator may remove the temporary tablespace manually or restart the server with the same configuration, which removes and recreates the temporary tablespace这是非压缩的innodb临时表的独立表空间。通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在支持大文件的系统这个文件大小是可以无限增长的。该参数是5.7的新特性针对临时表及相关对象引入新的“non-redo” undo log,存放于临时表空间。该类型的undo log非 redolog 因为临时表不需崩溃恢复、也就无需redo logs,但却需要 undo log用于回滚、MVCC等。默认的临时表空间文件为ibtmp1,位于数据目录在每次服务器启动时被重新创建,可通过innodb_temp_data_file_path指定临时表空间。(http://dev.mysql.com/doc/refman/5.7/en/innodb-temporary-table-undo-logs.html)
解决办法:1,修改my.cnf配置文件:innodb_temp_data_file_path = ibtmp1:12M:autoextend:max:5G2,设置innodb_fast_shutdown参数SET GLOBAL innodb_fast_shutdown = 0; #InnoDB does a slow shutdown, a full purge and a change buffer merge before shutting down3,关闭mysql服务4,删除ibtmp1文件5,启动mysql服务
注意:为了避免以后再出现类似的情况,一定要在限制临时表空间的最大值,如innodb_temp_data_file_path = ibtmp1:12M:autoextend:max:5G
ibtmp1是个什么东西呢?查看官方文档后发现The temporary tablespace is a tablespace for non-compressed InnoDB temporary tables and related objects. The configuration option, innodb_temp_data_file_path, defines a relative path for the temporary tablespace data file. If innodb_temp_data_file_path is not defined, a single auto-extending 12MB data file named ibtmp1 is created in the data directory. The temporary tablespace is recreated on each server start and receives a dynamically generated space ID, which helps avoid conflicts with existing space IDs. The temporary tablespace cannot reside on a raw device. Startup is refused if the temporary tablespace cannot be created.The temporary tablespace is removed on normal shutdown or on an aborted initialization. The temporary tablespace is not removed when a crash occurs. In this case, the database administrator may remove the temporary tablespace manually or restart the server with the same configuration, which removes and recreates the temporary tablespace这是非压缩的innodb临时表的独立表空间。通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在支持大文件的系统这个文件大小是可以无限增长的。该参数是5.7的新特性针对临时表及相关对象引入新的“non-redo” undo log,存放于临时表空间。该类型的undo log非 redolog 因为临时表不需崩溃恢复、也就无需redo logs,但却需要 undo log用于回滚、MVCC等。默认的临时表空间文件为ibtmp1,位于数据目录在每次服务器启动时被重新创建,可通过innodb_temp_data_file_path指定临时表空间。(http://dev.mysql.com/doc/refman/5.7/en/innodb-temporary-table-undo-logs.html)
解决办法:1,修改my.cnf配置文件:innodb_temp_data_file_path = ibtmp1:12M:autoextend:max:5G2,设置innodb_fast_shutdown参数SET GLOBAL innodb_fast_shutdown = 0; #InnoDB does a slow shutdown, a full purge and a change buffer merge before shutting down3,关闭mysql服务4,删除ibtmp1文件5,启动mysql服务
注意:为了避免以后再出现类似的情况,一定要在限制临时表空间的最大值,如innodb_temp_data_file_path = ibtmp1:12M:autoextend:max:5G
相关文章推荐
- mysql5.7 ibtmp1文件过大
- 11.2.04 Oracle RAC 目录中 crfclust.bdb文件过大,Bug 20186278
- tar打包过大,通过split分割拆解大包文件
- 上传文件过大的问题
- 解决webpack打包文件过大的问题
- nachos中拷贝文件过大的问题
- SQL Server中 ldf 文件过大的解决方法
- 使用Logrotate解决Tomcat日志文件catalina.out过大的问题
- 删除过期和过大文件
- 黄聪:Mysql数据库还原备份提示MySQL server has gone away 的解决方法(备份文件数据过大)
- 【Vue】项目打包的时候,build.js文件过大,可以通过设置懒加载或者按照路由分模块加载进行打包
- catalina文件过大问题
- 解决docker数据文件过大导致根磁盘满的问题
- Tomcat catalina.out文件过大的解决方案整理.
- Mysql----数据库导入文件过大问题的解决方法
- PHP上传文件时,文件过大$_FILES为空
- 数据库清除日志文件(LDF文件过大)
- AIX 日志清理 监听日志清理--过大的Oracle监听日志文件处理
- catalina.out文件过大
- 解决flex嵌入字体导致文件过大的问题