編集

次の方法で共有


Set timeout limits

Applies to: ✅ Azure Data Explorer

It's possible to customize the timeout length for your queries and management commands. In this article, you'll learn how to set a custom timeout in various tools such as the Azure Data Explorer web UI, Kusto.Explorer, Kusto.Cli, Power BI, and when using an SDK. Certain tools have their own default timeout values, but it may be helpful to adjust these values based on the complexity and expected runtime of your queries.

Note

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

Azure Data Explorer web UI

This section describes how to configure a custom query timeout and admin command timeout 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 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 the left menu, select Connection.

  4. Under the Query timeout (in minutes) setting, use the slider to choose the desired query timeout length.

  5. Under the Admin command timeout (in minutes) setting, use the slider to choose the desired admin command timeout length.

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

  6. Close the settings window, and the changes will be saved automatically.

Kusto.Explorer

This section describes how to configure a custom query timeout and admin command timeout in the Kusto.Explorer.

Prerequisites

Set timeout length

  1. Open the Kusto.Explorer tool.

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

  3. On the right-hand side, select Options.

    Screenshot showing the options widget in the Kusto.Explorer tool.

  4. In the left menu, select Connections.

  5. In the Query Server Timeout setting, enter the desired timeout length. The maximum is 1 hour.

  6. Under the Admin Command Server Timeout setting, enter the desired timeout length. The maximum is 1 hour.

    Screenshot showing settings that control the timeout length in Kusto.Explorer.

  7. Select OK to save the changes.

Kusto.Cli

This section describes how to configure a custom server timeout in the Kusto.Cli.

Prerequisites

Set timeout length

Run the following command to set the servertimeout client request property with the desired timeout length as a valid timespan value up to 1 hour.

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

Alternatively, use the following command to set the norequesttimeout client request property, which will set the timeout to the maximum value of 1 hour.

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

This section describes how to configure a custom server timeout in Power BI.

Prerequisites

Set timeout length

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

  2. In the top menu, select Transform Data.

    Screenshot of the transform data option in Power BI Desktop.

  3. In the top menu, select Advanced Query 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

To learn how to set timeouts with the SDKs, see Customize query behavior with client request properties.