Set timeout limits

Applies to: ✅ Azure Data Explorer

Customize timeouts for queries and management commands. This article shows how to set custom timeouts in the Azure Data Explorer web UI, Kusto.Explorer, Kusto.Cli, Power BI, and an SDK. Each tool has a default timeout, but adjust it based on query complexity and expected runtime.

Note

Server side policies, such as the request limits policy, can override the timeout specified by the client.

Azure Data Explorer web UI

Configure custom query and admin command timeouts in the Azure Data Explorer web UI.

Prerequisites

  • A Microsoft account or a Microsoft Entra user identity. An Azure subscription isn't required.
  • An Azure Data Explorer cluster and database. Create a cluster and database.

Set the timeout length

  1. Sign in to the Azure Data Explorer web UI with your Microsoft account or Microsoft Entra user identity credentials.

  2. In the top menu, select the Settings icon.

  3. From Settings, select the Connection tab.

  4. Under Query timeout (in minutes), move the slider to set the query timeout length.

  5. Under Admin command timeout (in minutes), move the slider to set the admin command timeout length.

    Screenshot of the settings in the Azure Data Explorer web UI that control timeout length.

  6. Close the settings window to save your changes.

Kusto.Explorer

Set custom query and admin command timeouts in Kusto.Explorer.

Prerequisites

Set timeout length

  1. Open Kusto.Explorer.

  2. In the top menu, select the Tools tab.

  3. In the Tools tab, select Options.

    Screenshot of the Options dialog in Kusto.Explorer.

  4. In the Options dialog, select Connections.

  5. For Query Server Timeout, enter the timeout length (maximum 1 hour).

  6. For Admin Command Server Timeout, enter the timeout length (maximum 1 hour).

    Screenshot of settings for query and admin command timeouts in Kusto.Explorer.

  7. Select OK to save.

Kusto.Cli

Configure a custom server timeout in Kusto.Cli.

Prerequisites

Set timeout length

Run this command to set the servertimeout client request property to a valid timespan value (up to 1 hour). Replace <ConnectionString> and <timespan> with your connection string and timespan value.

Kusto.Cli.exe <ConnectionString> -execute:"#crp servertimeout=<timespan>" -execute:"…"

Or run this command to set the norequesttimeout client request property, which sets the timeout to the maximum of 1 hour. Replace <ConnectionString> with your connection string.

Kusto.Cli.exe <ConnectionString> -execute:"#crp norequesttimeout=true" -execute:"…"

Once set, the client request property applies to all future values until the app is restarted or another value gets set. To retrieve the current value, use:

Kusto.Cli.exe <ConnectionString> -execute:"#crp servertimeout"

Power BI

Set a custom server timeout in Power BI Desktop.

Prerequisites

Set timeout length

  1. Connect to your Azure Data Explorer cluster from Power BI Desktop.

  2. On the ribbon, select Transform Data.

    Screenshot of the transform data option in Power BI Desktop.

  3. In the query menu, select Advanced Editor.

    Screenshot of the Power BI advanced query editor option in Power BI Desktop.

  4. In the pop-up window, set the timeout option in the fourth parameter of the AzureDataExplorer.Contents method. The following example shows how to set a timeout length of 59 minutes.

    let 
        Source = AzureDataExplorer.Contents(<cluster>, <database>, <table>, [Timeout=#duration(0,0,59,0)])
    in
        Source
    
  5. Select Done to apply the changes.

SDKs

Set SDK timeouts in Customize query behavior with client request properties.