Introduction
By default, the SQL client command timeout is set to 30 seconds. This means that if the system runs a slow query - such as deleting a large dataset of users with a large page size or querying users with a very large page size - the query may encounter a timeout error.
Configuring a custom SQL command timeout is essential for managing the performance and reliability of a system interacting with a database.
Configure a custom SQL command timeout
Safewhere Identify allows system administrators to adjust the SQL command timeout for all database queries and commands. To set this value, access the Settings
page and and configure the SQL Command Timeout setting accordingly
- Default Value: 30 seconds (if not specified)
Key Considerations
The SQL command timeout setting is crucial because it defines the duration a client waits for a command to execute before terminating it. Here's why a lower timeout is often beneficial:
Prevents Long Waits: A shorter timeout reduces the risk of prolonged waits on commands that may be blocked or taking too long to execute. Higher timeouts can degrade application performance, especially when database issues cause extended query times.
Resource Management: Shorter timeouts help manage resources effectively by releasing connections that might otherwise be occupied by long-running queries.
Error Detection: A reduced timeout allows for quicker problem detection in SQL commands or network issues, as the system will report errors sooner if something goes wrong.
Concurrency Management: In high-traffic environments, lengthy timeouts can lead to a backlog of pending queries, resulting in concurrency issues or potential deadlocks.