web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Assistance needed: Que...
Power Automate
Unanswered

Assistance needed: Query Execution Limit Exceeded in Power Automate Flow

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

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:
I have the same question (0)
  • v-yoelma Profile Picture
    Microsoft Employee on at
    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 239 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 177 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 97 Super User 2026 Season 1

Last 30 days Overall leaderboard