Skip to main content

Troubleshooting Guide: SQL Execution Cancelled Database \/ Timeout

Distributor fix for 'SQL execution cancelled' or timeout errors when running Encompass reports, queries or API calls: check the connection, narrow date ranges and filters, split large reports. v26.01+.

B
Written by Bailey Naas-Thornton

Minimum Version Required: 26.01

Pre-Conditions

  • Requires an active and stable internet connection.

  • Must be attempting to run a database query, execute a report, or trigger an API call within the system.

  • Must be logged in with permissions to view the report or execute the target query.

Steps

  • Verify Network Stability: Confirm your internet connection is stable. A network connection dropped mid-query execution can cause the database call to cancel.

  • Check for Manual Cancellations: Ensure that the pending request was not explicitly canceled by the user or an integrated application mid-execution.

  • Evaluate Query Size and Complexity: If the command execution timeout limit is reached before the query is completed, attempt to reduce the date range or apply stricter filters to the report or query.

  • Monitor System Resources: Check for any known system latency or server resource pressure (CPU/Memory) that might be forcing query aborts.

  • Review Gateway Connections: If using an upstream API or external integration, verify that an upstream gateway timeout has not cascaded to cause a database call cancellation.

  • Contact Support: If the issue persists after attempting the steps above, please contact support. For efficient troubleshooting, you must gather and provide the following information:

    • Exact error messages or codes encountered.

    • Screenshots or video recordings of the issue.

    • Log files (including Load Balancer Logs or API Processing Times, if applicable).

    • The exact steps taken by the customer that led to the issue.

    • The date and time the issue was first observed and any recurrence.

    • Any changes made to the system before the issue appeared.

Fields And Definitions

  • SQL Execution Cancelled / Timeout: An exception indicating that a Structured Query Language (SQL) command failed to execute completely because it exceeded allowed time limits, lost network connection, or was manually aborted.

  • Command Execution Timeout Limit: A system-defined maximum allowed processing time for a single query or API request before it is forcefully stopped to preserve server health.

  • Upstream Gateway Timeout: An error that occurs when a server acting as a gateway or proxy does not receive a timely response from an upstream server, cascading down to cancel the original database request.

Best Practices

  • Apply Default Filters: Always configure and utilize default filters on reports to prevent massive, unfiltered executions that cause timeouts.

  • Filter Early on Date Ranges: Apply date range filters as early as possible in your query to significantly limit the volume of data being processed.

  • Break Down Large Reports: Split complex reports into smaller, focused reports or dashboard tabs to improve processing time and reduce the likelihood of server resource pressure.

  • Optimize Joins (Join Required = False): When building custom reports, use this setting where appropriate so the engine can implement automatic join-pruning, only pulling data when explicitly needed.

  • Limit Row Returns: Configure reports to return only the necessary number of rows. Exceptionally large result sets increase processing time and the risk of a dropped connection.

Did this answer your question?