You are currently reviewing an older revision of this page.

KB-1681 MySQLTimeoutException: Statement cancelled due to timeout or client request

Symptoms

A query rule fails to run, and one of the following error(s) is seen in the application server log:

Expression evaluation error in rule '<rule name>' (called by rules '<rule name 1>' > '<rule name 2>') at function a!queryEntity: An error occurred while retrieving the data. (APNX-1-4198-000)

 

Expression evaluation error in rule '<rule name>' at function 'queryruleexec': Error evaluating function 'queryruleexec' : Unexpected error executing query (type: [<CDT name>], query: [<rule name>], order by: [[]], filters:[null])

with the following caused by:

Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request

Cause

The MySQLTimeoutException indicates that the query has reached the query timeout threshold which has caused the query to time out. For more information on the timeout threshold, see: Query Rule Limits. For Appian Cloud environments, this threshold is set at 10 seconds.

Action

Review the 'Execute Time (ms)' column of the perf_monitor_rdbms_slow.csv log located in <APPIAN_HOME>/logs/perflogs to confirm if the failed query has exceeded the configured timeout value. 

The query should be optimized so that it can be completed within the timeout. Note that increasing the timeout threshold may impact the system performance and stability. The query timeout value is not configurable in Appian Cloud.

Also see: Database Performance Best Practices and An Introduction to Query Optimization.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: August 2018