Blog Post

Azure Data Explorer Blog
1 MIN READ

How to increase query run-time limitation in Azure Data Explorer

Tzvia's avatar
Tzvia
Icon for Microsoft rankMicrosoft
May 23, 2019

If you have query that gets timed out and you want to adjust the run-time limitation:

Open Azure Data Explorer Web UI à Settings à Connection à Query timeout (in minutes)

 

 

Query timeout can be adjusted between 1-60 minutes.

 

 

Read Query data in Azure Data Explorer for more information on using the Web UI

You can also always reach us at Stack overflowTwitter, and tech community.

Updated Jun 10, 2019
Version 5.0
  • wernerzirkel's avatar
    wernerzirkel
    Brass Contributor

    Increasing individual query runtime may have impact on database performance. The more active users, the more focus on stability is required. Kusto is not different than any other db at this point.

     

    That is why I would consider introducing workload management.  Here's an example:

    .alter cluster policy request_classification '{"IsEnabled":true}' <|

        case(

            request_properties.current_application == "KusWeb", "reporting" ,

            request_properties.current_principal in (

             "aaduser=...-815b-Uf0fb024e045", //admin joe

             "aaduser=...-815b-bf0fbO24e043", //admin mary

             "aaduser=...-815b-bf0fb024e663" //VIP ->our CIO 🙂

             ), "adminuser",

             request_properties.current_application == "Kusto.Explorer" , "standarduser",

             "default")

     

     

    .create-or-alter workload_group ['standarduser']

    ```

    {

      "RequestLimitsPolicy": {

        "DataScope": {

          "IsRelaxable": true,

          "Value": "All"

        },

        "MaxMemoryPerQueryPerNode": {

          "IsRelaxable": true,

          "Value": 30064535552

        },

        "MaxMemoryPerIterator": {

          "IsRelaxable": true,

          "Value": 5368709120

        },

        "MaxFanoutThreadsPercentage": {

          "IsRelaxable": true,

          "Value": 100

        },

        "MaxFanoutNodesPercentage": {

          "IsRelaxable": true,

          "Value": 100

        },

        "MaxResultRecords": {

          "IsRelaxable": true,

          "Value": 500000

        },

        "MaxResultBytes": {

          "IsRelaxable": true,

          "Value": 67108864

        },

        "MaxExecutionTime": {

          "IsRelaxable": true,

          "Value": "00:02:00"

        }

      },

      "RequestRateLimitPolicies": [

        {

          "IsEnabled": true,

          "Scope": "WorkloadGroup",

          "LimitKind": "ConcurrentRequests",

          "Properties": {

            "MaxConcurrentRequests": 80

          }

        }

      ],

      "RequestRateLimitsEnforcementPolicy": {

        "QueriesEnforcementLevel": "QueryHead",

        "CommandsEnforcementLevel": "Database"

      }

    }

     ```

     

     

  • In case of Kusto Explorer (not Web UI):

    Tools-->Options-->Connections

     

     

     

  • Ideally, by following query best practices and making sure the query (and perhaps the underlying schema of the data) are optimized, one should be able to actually decrease the query's runtime, and not consider increasing the default query timeout.