Azure SQL Database has no server-side statement timeout configuration across client drivers
0 reputation · 04 Jan 2023, 21:46 UTC
Azure SQL Database does not expose a native T-SQL SET STATEMENT_TIMEOUT, relying instead on client driver CommandTimeout settings for query duration limits. This design creates a fragmentation point where timeout thresholds, error handling, and cancellation semantics differ across ADO.NET, JDBC, ODBC, Python, and PHP drivers.
A related concern is that per-session LOCK_TIMEOUT values are not retained when connections are drawn from a pool or re-established after reconnection, potentially allowing lock-wait periods to exceed intended bounds.
Additionally, client-initiated cancellation via KILL or driver-level cancel may terminate a statement without rolling back an active transaction, leaving the session in an inconsistent state if application-level try/catch and transaction management are absent.
Given these gaps, what mechanisms can applications adopt to enforce uniform statement timeout behavior across heterogeneous drivers? How should transaction boundaries be structured to absorb cancellation side effects without data corruption? And does the Query Store instrumentation provide sufficient signal to detect timeout-driven query abandonment in production workloads?