Failed to execute mysql_file_stat on file
来源:互联网 发布:银月网络手游 编辑:程序博客网 时间:2024/06/01 10:07
Version: MySQL 5.6.19
现象:mysql错误日志告警:
[Note] Failed to execute mysql_file_stat on file ‘./mysql-bin.024316’
原因:purge binlog时,由于有些binlog 文件不在mysql-bin.index 中导致。
起因
大数据的一台MySQL磁盘空间告警,经检查发现是binlog太多导致。
show variables like ‘expire_logs_days’;
+——————+——-+
| Variable_name | Value |
+——————+——-+
| expire_logs_days | 3 |
+——————+——-+
1 row in set (0.00 sec)
处理过程
这几天有大量的数据导入,导致binlog产生过多。于是用’PURGE BINARY LOGS TO’ 删除部分binlog。
PURGE BINARY LOGS TO ‘mysql-bin.020456’;
触发报警
删除后,收到邮件告警,错误如下:
2017-08-18 09:33:10 3314 [Note] Failed to execute mysql_file_stat on file ‘./mysql-bin.024316’
2017-08-18 09:33:10 3314 [Note] Failed to execute mysql_file_stat on file ‘./mysql-bin.024317’
2017-08-18 09:33:10 3314 [Note] Failed to execute mysql_file_stat on file ‘./mysql-bin.024318’
2017-08-18 09:33:10 3314 [Note] Failed to execute mysql_file_stat on file ‘./mysql-bin.024319’
2017-08-18 09:33:10 3314 [Note] Failed to execute mysql_file_stat on file ‘./mysql-bin.024320’
2017-08-18 09:33:10 3314 [Note] Failed to execute mysql_file_stat on file ‘./mysql-bin.024321’
2017-08-18 09:33:10 3314 [Note] Failed to execute mysql_file_stat on file ‘./mysql-bin.024322’
2017-08-18 09:33:10 3314 [Note] Failed to execute mysql_file_stat on file ‘./mysql-bin.024323’
root cause
已经配置了expire_logs_days,且没有人手动删除binlog,为什么会出现这个错误呢?
是不是定时任务导致的呢?
crontab -l 检查了mysql用户下的几个定时任务,没发现问题。
会不会是其它用户下的定时任务呢?
检查root用户下的定时任务发现有一个备份binlog的定时任务
关键的一条命令是:ls -d /data1/mysql-bin* | sort | head -nexpr $all_gm - $num
| xargs gzip
好暴力的命令啊,直接压缩binlog。这就是binlog丢失的原因。
- Failed to execute mysql_file_stat on file
- Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///E:/test
- Failed to execute 'texImage2D' on 'WebGLRenderingContext
- maven failed to execute goal on project
- Failed to execute goal on project...
- Failed to execute 'importScripts' on 'WorkerGlobalScope'
- DOMException: Failed to execute 'insertBefore' on 'Node'
- Uncaught SecurityError: Failed to execute 'replaceState' on 'History':解决方案
- Failed to execute aapt
- Linux:Failed to get exclusive lock on the configuration file
- Failed to execute WebDAV PROPPATCH
- AJAX请求在微信环境报错:NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load
- [ERROR] Failed to execute goal on project sypro: Could not resolve dependencies for project sy.demo:
- 用postMesage实现跨域,并解决Failed to execute 'postMessage' on 'DOMWindow'
- Ueditor一加载就报Uncaught TypeMismatchError: Failed to execute 'removeAttributeNode' on 'Element'
- UE报错:Uncaught TypeMismatchError: Failed to execute 'removeAttributeNode' on 'Element'解决方案
- Failed to execute goal on project mycollab-config: Could not resolve dependencies for project com.es
- Failed to execute goal com.github.wvengen:proguard-maven-plugin:2.0.10:proguard (default) on project
- 【练习赛补题】poj1426 【同余定理】【有趣~】
- c++11std::thread扩展
- 九度1040:Prime Number
- hdu6143 排列
- 简单易懂的金融"杠杆原理"解说
- Failed to execute mysql_file_stat on file
- Google算法题:132模式
- 【总结】计算机网络
- 三角形测试用例
- CSS 框模型( Box module )
- bat 以管理员权限运行
- nginx动静资源服务器简单配置
- 3.6 3.7
- 支付宝小程序后来居上,微信能抗住吗?