Statement cancelled due to timeout or client request
Posted digdeep
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Statement cancelled due to timeout or client request相关的知识,希望对你有一定的参考价值。
tomcat日志报错:
org.springframework.dao.QueryTimeoutException:
### Error querying database. Cause: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request
### The error may exist in file [/var/lib/tomcat8/webapps/ROOT/WEB-INF/classes/mappers/DeviceMapper.xml]
### The error may involve defaultParameterMap
### The error occurred while setting parameters
原因是,MySQL优化器执行计划 使用了错误的索引,导致一条SQL查询语句超时,需要30多秒,所以报错。
解决方法是使用 force index 提示 mysql 选择正确的索引。搞定。
以上是关于Statement cancelled due to timeout or client request的主要内容,如果未能解决你的问题,请参考以下文章
Canceling query because of high VMEM usage. Used: 4943MB, available 564MB, red zone: 5102MB
Canceling query because of high VMEM usage. Used: 4943MB, available 564MB, red zone: 5102MB
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
bug 记录 Unable to start ServletWebServerApplicationContext due to multiple ServletWebServerFactory be