在给数据库添加索引时,提示失败“ERROR 1878 (HY000) at line 1: Temporary file write failure.”,查看后台日志提示磁盘空间不足。

2022-10-18T15:27:14.349897+08:00 5659887 [Warning] InnoDB: Retry attempts for writing partial data failed.
2022-10-18T15:27:14.394634+08:00 5659887 [ERROR] InnoDB: Write to file (merge)failed at offset 4249878528, 1048576 bytes should have been written, only 684032 were written. Operating system error number 28. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
2022-10-18T15:27:14.394738+08:00 5659887 [ERROR] InnoDB: Error number 28 means 'No space left on device'

经过分析后发现是/tmp目录空间不足,登录数据库后进行参数修改:

mysql> show variables like '%tmp%'-> ;
+----------------------------------+----------+
| Variable_name                    | Value    |
+----------------------------------+----------+
| default_tmp_storage_engine       | InnoDB   |
| innodb_tmpdir                    |          |
| internal_tmp_disk_storage_engine | InnoDB   |
| max_tmp_tables                   | 32       |
| slave_load_tmpdir                | /tmp     |
| tmp_table_size                   | 33554432 |
| tmpdir                           | /tmp     |
+----------------------------------+----------+
7 rows in set (0.00 sec)
mysql> set global tmpdir='/data1/tmp';
ERROR 1238 (HY000): Variable 'tmpdir' is a read only variable
mysql> 

这个/tmpdir是个只读参数,只能修改配置文件后重启服务器。但这是生产主从环境,没有停机的时间点,故只能够从操作系统层面增加/tmp分区的空间了。

[ERROR] InnoDB: Write to file (merge)failed at offset 4249878528, 1048576 bytes should have been wri相关推荐

  1. Error updating changes: Out of memory, malloc failed (tried to allocate 1048576 bytes)

    这个错误信息提示你的程序尝试申请更多的内存空间时,内存不足,从而无法完成这个操作.出现这个错误通常是因为程序中存在内存泄漏.使用过多的内存等问题. 如果你的程序在运行时出现这个错误,你可以考虑以下几个 ...

  2. mysql 100600_MySQL ERROR 1034: Incorrect Key File on InnoDB Table

    Sometimes, you may experience "ERROR 1034: Incorrect key file" while running the ALTER TAB ...

  3. InnoDB: auto-extending data file ./ibdata1 is of a different size 0 pages (rounded down to MB) than

    报错详情 [mysql@infoplat5-zww:~]$/usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/l ...

  4. [已解决] InnoDB: preallocating bytes for file ./ibdata1 failed with error

    Docker 中的 Alpine 初始化数据库 docker exec cmdb3 mysql_install_db --user=root 复制代码 时报错 : 2018-07-21 14:00:2 ...

  5. 人人开源 VUE项目报错./src/assets/scss/index.scssModule build failed: Error: ENOENT: no such file or direct

    Module build failed: Error: ENOENT: no such file or directory, scandir 'C:\Users\administrator\Deskt ...

  6. Error Some file crunching failed, see logs for details 解决方案

    报错Bug: Error:Execution failed for task ':app:mergeDebugResources'. > Error: Some file crunching f ...

  7. Module build failed: Error: ENOENT: no such file or directory, scandir node_modules\node-sass\vendor

    npm install 报错 Module build failed: Error: ENOENT: no such file or directory, scandir 'D:\workspaces ...

  8. vue启动报错Module build failed: Error: ENOENT: no such file or directory

    vue启动项目报错,一大坨  如下 Module build failed: Error: ENOENT: no such file or directory, scandir '/Users/son ...

  9. [MAIXPY]kpu: load error:2005, ERR_READ_FILE: read file failed问题解决

    前言 最近弄K210的时候遇到一个问题,[MAIXPY]kpu: load error:2005, ERR_READ_FILE: read file failed 主要体现在以下几个方面 一.固件 去 ...

  10. 解决警告: Failed to scan JAR[...] java.util.zip.ZipException: error in opening zip file

    报错经历: 今天在使用maven build 启动项目的时候报错: 警告: Failed to scan JAR [file:/C:/Users/Administrator/.m2/repositor ...

最新文章

  1. api 定位 微信小程序 精度_微信小程序开发知识点集锦
  2. 基于 Python Matplotlib 模块的高质量图形输出
  3. 读取siftgeo格式文件的matlab程序
  4. Git根据文件名字查询修改文件内容
  5. [蓝桥杯]回形取数-方向向量+模拟
  6. 伪代码书写规范_C++代码书写规范(推荐新手程序员)
  7. 设计模式学习笔记——备忘录(Memento)模式
  8. EasyInvoice 简介
  9. C++_C++中的关键字_标识符命名规则_数据类型之整形_short_int_long_longlong---C++语言工作笔记010
  10. [转载] python自带sqlite库_Python内置库SQlite3使用指南
  11. 领域驱动设计(DDD)入门概要
  12. Html 设置整个页面的背景颜色
  13. 笔记本开启WiFi共享后无法联网
  14. android脚本模拟器,android运行模拟器脚本(批处理)
  15. 用C#编写HMI界面,用USB转485和PLC通讯,PLC用的是台达的DVP-12SE系列
  16. 送人玫瑰,手有余香----七夕情人节的电子玫瑰
  17. TreeGrid插件简练了解使用
  18. 【Java】java.lang.Object
  19. 清华大学 zhongguo li 计算机,2013年EI收录中国期刊名单(包括新收录的).xls
  20. 将监控摄像头的监控视频转发到互联网,实现远程视频监控

热门文章

  1. 洛谷再分肥宅水c语言,【菜鸟进阶之路】P5706【深基2.例8】再分肥宅水 - 洛谷
  2. pc网页唤起QQ、企业微信、skype、whatsApp等
  3. 西安大略电子与计算机工程专业,2020年西安大略大学电子与计算机工程(工程科学硕士, 工程硕士)专业硕士申请条件-学费-世界排名...
  4. Vue在Nginx的使用
  5. OpenCV精进之路(十八):工具——“全能扫描王“扫描软件
  6. 简单的有监督学习实例——简单线性回归
  7. 码农翻身讲网络4:从Token到Sessions说到OAuth认证和CAS单点登录
  8. UPD(user datagram protocol)
  9. 【CSAPP】程序的机器级表示:基础知识
  10. windows动态ip和静态ip的bat文件