MySQL Other--ER_QUERY_INTERRUPTED(1317)
2023-04-18 15:37:02 时间
场景描述
应用程序报错:
### Error updating database. Cause: com.mysql.jdbc.exceptions.MySQLStatementCancelledException: Statement cancelled due to client request
### The error may involve com.qunar.flight.tts.rmgmt.dao.alternative.RiskMsgDao.unfreezeAfterFlyRiskMsgByDomainTkt-Inline
### The error occurred while setting parameters
### Cause: com.mysql.jdbc.exceptions.MySQLStatementCancelledException: Statement cancelled due to client request
; uncategorized SQLException; SQL state [null]; error code [0]; Statement cancelled due to client request;
nested exceptionis com.mysql.jdbc.exceptions.MySQLStatementCancelledException: Statement cancelled due to client request
...
Caused by: com.mysql.jdbc.exceptions.MySQLStatementCancelledException: Statement cancelled due to client request
....
查看慢日志:
# Time: 2023-03-14T17:45:36.824642+08:00
# User@Host: xxxx_rw[xxxx_rw] @ [10.xx.xx.xx] Id: 857038238
# Schema: xxx_dba Last_errno: 1317 Killed: 0
# Query_time: 27.661371 Lock_time: 0.000062 Rows_sent: 0 Rows_examined: 837113 Rows_affected: 0
# Bytes_sent: 44
SET timestamp=1678787136;
update xxx
set xxx=xxx
where xxx < DATE_SUB(CURRENT_TIMESTAMP(),INTERVAL 1 DAY);
问题原因
应用程序部署有守护者程序,执行超过N秒后会自动向MySQL服务发送KILL请求,触发请求终止。
排查重点
- 根据"Statement cancelled due to client request"错误来查找。
- 根据慢日志中Last_errno:1317错误来排查。
其他扩展
- 查询执行时间超过应用客户端配置的超时设置时,会报错:Statement cancelled due to timeout or client request
相关文章
- Python使用tkinter组件Label显示简单数学公式
- 内网渗透之DCOM横向移动
- 以目标为导向的语义交流的共同语言——一个课程学习框架
- python爬虫前奏【成信笔记】
- HTML 5 File API:文件拖放上传功能
- 教你快速创建 Python 虚拟环境
- pyenv 实现Python多版本自由切换
- 用 Python 对 Excel文件进行批量操作
- Python - 接入钉钉机器人
- Python - 抓取 iphone13 pro 线下店供货信息并发送到钉钉机器人,最后设置为定时任务
- crontab - 解决 mac 下通过 crontab 设置了 Python 脚本的定时任务却无法运行
- [源码解析] PyTorch分布式(5) ------ DistributedDataParallel 总述&如何使用
- Python科普系列——类与方法(上篇)
- SAP对STO的交货单执行PGI,报错 -Fld selectn for mvmt type 643 acct 400020 differs
- Spring Boot 实现通用 Auth 认证的 4 种方式
- 盘点4种使用Python批量合并同一文件夹内所有子文件夹下的Excel文件内所有Sheet数据
- OushuDB 学习经验分享(三):技术特点
- Java和Python思维方式的不同之处
- Python中日志记录新技能
- 奥比中光Gemini OpenCV—Python使用