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 one of the following caused by clauses:
Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request
Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The query has timed out.
These errors indicate 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.
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.
This article applies to all versions of Appian.
Last Reviewed: September 2018
© 2021 Appian. All rights reserved.