Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Assistance needed: Query Execution Limit Exceeded in Power Automate Flow

(1) ShareShare
ReportReport
Posted on by

Hi Power Automate Support Team,

I am encountering an issue with one of my Power Automate flows that executes a Kusto query. The flow fails with the following error message:

 
{
"statusCode": 400,
"headers": {
"Cache-Control": "no-store, no-cache",
"Pragma": "no-cache",
"Set-Cookie": "ARRAffinity=b9821e690af9852610f8eeeca3309b727f1b53f90b47715d212bd0be30459022;Path=/;HttpOnly;Secure;Domain=kusto-cus.azconn-cus-001.p.azurewebsites.net,ARRAffinitySameSite=b9821e690af9852610f8eeeca3309b727f1b53f90b47715d212bd0be30459022;Path=/;HttpOnly;SameSite=None;Secure;Domain=kusto-cus.azconn-cus-001.p.azurewebsites.net",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "3e33c036-8fdc-4655-a555-561b32856297",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "false",
"x-ms-apihub-obo": "false",
"Date": "Mon, 22 Jul 2024 19:34:42 GMT",
"Content-Length": "167",
"Content-Type": "application/json",
"Expires": "-1"
},
"body": {
"message": "Query execution has exceeded the allowed limits of 50000 max records or max size of 32 MB\r\nclientRequestId: 3e33c036-8fdc-4655-a555-561b32856297"
}
}

It seems that the query execution exceeds the allowed limits of 50,000 maximum records or a maximum size of 32 MB. While the query runs successfully in Kusto Explorer, it breaks the flow in Power Automate due to this limitation.

Could you please assist in resolving this issue? Specifically, I need help with the following:

  1. Increasing the limit for query execution to handle larger data sets within Power Automate.
  2. Providing any alternative solutions or best practices to manage large data sets without hitting the execution limits.
 
here's the query, the query worked fine before, now with issues.
Execute in [Web] [Desktop] [cluster('vmainsight.kusto.windows.net').database('Air')]
let pageSize = 1000;
let pageNumber = 1; // Change this value for each subsequent request
let startRow = (pageNumber - 1) * pageSize;
let endRow = pageNumber * pageSize;
let mellanoxDetails = cluster('netperf').database('NetPerfKustoDB').RdmaEStatsAgentVersions
| where PreciseTimeStamp > ago(7d) // Reduced the time range
| summarize arg_max(PreciseTimeStamp, MellanoxDriverVersion) by RoleInstance
| project RoleInstance = tolower(RoleInstance), MellanoxDriverVersion;
let summarizedDumps = cluster('azurewatsoncustomer').database('AzureWatsonCustomer').table("CustomerAPDumpAnalysisResult")
| where PreciseTimeStamp > ago(7d) // Reduced the time range
| summarize km_bugchecks_last_month = count() by apMachine = tolower(apMachine);
cluster('azurewatsoncustomer').database('AzureWatsonCustomer').table("CustomerAPDumpAnalysisResult")
| where PreciseTimeStamp > ago(7d) // Reduced the time range
| where dumpType contains "km" and (bucketString contains "mlx" or bucketString contains "mlnx")
| where apEnvironment contains "Prd" and apEnvironment !contains "PrdGPC" and apEnvironment !contains "Str" and apEnvironment !contains "Stp" and apEnvironment !contains "sn4prdapp28" and apEnvironment !contains "Stf"
| project bucketString, crashTime, apMachine = tolower(apMachine), apEnvironment, osBuildInfo
| join kind=leftouter (summarizedDumps) on $left.apMachine == $right.apMachine
| join kind=leftouter (mellanoxDetails) on $left.apMachine == $right.RoleInstance
| summarize CountBeforeAndAfterMellanoxJoin = count(),
Total_Hits_1d = countif(todatetime(crashTime) > ago(1d)),
Total_Hits_7d = countif(todatetime(crashTime) > ago(7d))
by apMachine, bucketString, MellanoxDriverVersion, osBuildInfo
| summarize
Total_Hits_Per_Day = sum(Total_Hits_1d),
Total_Hits_Per_Week = sum(Total_Hits_7d)
by Bucket_Strings = bucketString, Mlx_Driver_Version = MellanoxDriverVersion, OS_version = osBuildInfo
| sort by Total_Hits_Per_Week desc
| serialize Rank = row_number()
| where Rank > startRow and Rank <= endRow
 
 
 
Another similar query, it works in kusto explorer, but I get a low memory warning that breaks the flow, is there a work around?

Query execution lacks memory resources to complete (80DA0007): [cluster('https://netperf.kusto.windows.net/')] [cluster('https://azurecm.kusto.windows.net/')] Partial query failure: Low memory condition (E_LOW_MEMORY_CONDITION). (message: 'bad allocation (E_LOW_MEMORY_CONDITION)', details: ''). (0th of 6 in an AggregateException with message: One or more errors occurred.)
 
 
 
let pageSize = 1000;
let pageNumber = 1;  // Change this value for each subsequent request
let startRow = (pageNumber - 1) * pageSize;
let endRow = pageNumber * pageSize;
let nicAgentVersions = cluster("Azurecm").database("AzureCM").ServiceManagerInstrumentation
| where PreciseTimeStamp > ago(7d)
| where ServiceName == "NicAgent"
| summarize arg_max(PreciseTimeStamp, ServiceVersion) by MachineName, Cluster
| project MachineName = tolower(MachineName), NicAgentVersion = ServiceVersion, Cluster;
let mellanoxDetails = cluster('netperf').database('NetPerfKustoDB').RdmaEStatsAgentVersions
| where PreciseTimeStamp > ago(7d)
| summarize arg_max(PreciseTimeStamp, MellanoxDriverVersion) by RoleInstance
| project RoleInstance = tolower(RoleInstance), MellanoxDriverVersion;
let summarizedDumps = cluster('azurewatsoncustomer').database('AzureWatsonCustomer').table("CustomerAPDumpAnalysisResult")
| where PreciseTimeStamp > ago(7d)
| summarize km_bugchecks_last_week = count() by apMachine = tolower(apMachine);
let mainQuery = cluster('azurewatsoncustomer').database('AzureWatsonCustomer').table("CustomerAPDumpAnalysisResult")
| where PreciseTimeStamp > ago(7d)
| where dumpType contains "km" and (bucketString contains "mlx" or bucketString contains "mlnx")
| where apEnvironment contains "Prd" and apEnvironment !contains "PrdGPC" and apEnvironment !contains "Str" and apEnvironment !contains "Stp" and apEnvironment !contains "sn4prdapp28" and apEnvironment !contains "Stf"
| project bucketString, crashTime, apMachine = tolower(apMachine), apEnvironment, osBuildInfo;
mainQuery
| join kind=leftouter (summarizedDumps) on $left.apMachine == $right.apMachine
| join kind=leftouter (nicAgentVersions) on $left.apMachine == $right.MachineName
| join kind=leftouter (mellanoxDetails) on $left.apMachine == $right.RoleInstance
| summarize CountBeforeAndAfterMellanoxJoin = count(),
    Total_Hits_1d = countif(todatetime(crashTime) > ago(1d)),
    Total_Hits_7d = countif(todatetime(crashTime) > ago(7d))
  by apMachine, bucketString, NicAgentVersion, MellanoxDriverVersion, Cluster, osBuildInfo
| summarize
    Total_Hits_Per_Day = sum(Total_Hits_1d),
    Total_Hits_Per_Week = sum(Total_Hits_7d)
  by Bucket_Strings = bucketString, NicAgent_Version = NicAgentVersion, Mlx_Driver_Version = MellanoxDriverVersion, Cluster, OS_version = osBuildInfo
| sort by Total_Hits_Per_Week desc
| serialize Rank = row_number()
| where Rank > startRow and Rank <= endRow;
 

Your prompt assistance in this matter would be greatly appreciated, as this issue is currently blocking our workflow.

Thank you for your support.

 

Youssef

Categories:
  • v-yoelma Profile Picture
    v-yoelma on at
    Assistance needed: Query Execution Limit Exceeded in Power Automate Flow
    I added a limit 10, I still get the same error
     
    let pageSize = 1000;
    let pageNumber = 1;  // Change this value for each subsequent request
    let startRow = (pageNumber - 1) * pageSize;
    let endRow = pageNumber * pageSize;
    let mellanoxDetails = cluster('netperf').database('NetPerfKustoDB').RdmaEStatsAgentVersions
    | where PreciseTimeStamp > ago(7d)  // Reduced the time range
    | summarize arg_max(PreciseTimeStamp, MellanoxDriverVersion) by RoleInstance
    | project RoleInstance = tolower(RoleInstance), MellanoxDriverVersion;
    let summarizedDumps = cluster('azurewatsoncustomer').database('AzureWatsonCustomer').table("CustomerAPDumpAnalysisResult")
    | where PreciseTimeStamp > ago(7d)  // Reduced the time range
    | summarize km_bugchecks_last_month = count() by apMachine = tolower(apMachine);
    cluster('azurewatsoncustomer').database('AzureWatsonCustomer').table("CustomerAPDumpAnalysisResult")
    | where PreciseTimeStamp > ago(7d)  // Reduced the time range
    | where dumpType contains "km" and (bucketString contains "mlx" or bucketString contains "mlnx")
    | where apEnvironment contains "Prd" and apEnvironment !contains "PrdGPC" and apEnvironment !contains "Str" and apEnvironment !contains "Stp" and apEnvironment !contains "sn4prdapp28" and apEnvironment !contains "Stf"
    | project bucketString, crashTime, apMachine = tolower(apMachine), apEnvironment, osBuildInfo
    | join kind=leftouter (summarizedDumps) on $left.apMachine == $right.apMachine
    | join kind=leftouter (mellanoxDetails) on $left.apMachine == $right.RoleInstance
    | summarize CountBeforeAndAfterMellanoxJoin = count(),
        Total_Hits_1d = countif(todatetime(crashTime) > ago(1d)),
        Total_Hits_7d = countif(todatetime(crashTime) > ago(7d))
      by apMachine, bucketString, MellanoxDriverVersion, osBuildInfo
    | summarize
        Total_Hits_Per_Day = sum(Total_Hits_1d),
        Total_Hits_Per_Week = sum(Total_Hits_7d)
      by Bucket_Strings = bucketString,  Mlx_Driver_Version = MellanoxDriverVersion, OS_version = osBuildInfo
    | sort by Total_Hits_Per_Week desc
    | serialize Rank = row_number()
    | where Rank > startRow and Rank <= endRow
     
    | limit 10

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard