I have two custom entities in CDS: Project and ProjectDelivery (with a one-to-many relation).
I have created a flow to calculate the total amount for all deliveries for each project: I first fetch all Projects, and for each Project I fetch all ProjectDeliveries. I loop over all ProjectDeliveries and sum the total amount of each delivery; after the loop I assign the sum to a field in Project.
This runs every 4 hours. Initially the flow ran fine, but after a while (after one day) all the initiated runs never end... they keep on running for days. Now I get a warning that the flow is disabled ("Your flow's performance may be slow because it's been running more actions than expected since 9/20/2020 5:38:49 PM (4 days ago). Your flow will be turned off if it doesn't use fewer actions").
I have to cancel all running flows manually one by one, and it seems I cannot see any reason why these flows keep on running... any ideas?
Thanks,
Koen
I know this must be frustrating. I really do think this has something to do with your license. Its hard for me or you to troubleshoot this. It seems like Microsoft has hidden the usage stats away. This is why I am suggesting to create a ticket with Microsoft. They will be able to tell you if its your license or not.
Usually if its the connectors throttling in Power Automate, you see a 429 error inside the Flow itself. This is what pushes me to believe there is something else going on that we cant see (License limits)
Hi @Jcook , I also think it has something to do with limits, but I am unable to find *any* clue on what/why/where/when...
the link you sent about checking usage, doesn't help me: I don't see any information when opening the gear icon menu...
in the mean time, multiple flow runs are running (for over more than 48 hours now) and the flow is tagged as "Slow performance"...
I am now looking at the following blogpost:
https://sharepains.com/2018/10/15/microsoft-flow-improve-your-flows-performance-in-a-few-easy-steps/
this is giving me a real headache... I thought a simple like a SQL-alike "sum aggregate using group by" would not be so difficult... am I using the wrong toolset to do this?!?
Can you check here:
https://docs.microsoft.com/en-us/power-automate/billing-questions#how-do-i-know-how-much-ive-used
This sounds like a throttling issue from too many runs per your license.
Contact Microsoft support for details on your license:
https://flow.microsoft.com/en-us/support/
Hi @Jcook ,
There are around 30 projects; In total there are 4000 deliveries, going from 1 delivery for a project, to 1400 deliveries for the largest project...
These are the licenses:
These are the actions:
"actions": {
"List_records": {
"runAfter": {},
"type": "OpenApiConnection",
"inputs": {
"host": {
"apiId": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps",
"connectionName": "shared_commondataserviceforapps",
"operationId": "ListRecords"
},
"parameters": {
"entityName": "pdc_projects",
"$filter": "statecode eq 0"
},
"authentication": "@parameters('$authentication')"
}
},
"Initialize_variable": {
"runAfter": {
"List_records": [
"Succeeded"
]
},
"type": "InitializeVariable",
"inputs": {
"variables": [
{
"name": "sumProduct",
"type": "float"
}
]
}
},
"Apply_to_each": {
"foreach": "@outputs('List_records')?['body/value']",
"actions": {
"Set_variable": {
"runAfter": {},
"type": "SetVariable",
"inputs": {
"name": "sumProduct",
"value": 0
}
},
"List_records_2": {
"runAfter": {
"Set_variable_2": [
"Succeeded"
]
},
"type": "OpenApiConnection",
"inputs": {
"host": {
"apiId": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps",
"connectionName": "shared_commondataserviceforapps",
"operationId": "ListRecords"
},
"parameters": {
"entityName": "pdc_productforprojects",
"$filter": "_pdc_project_value eq @{items('Apply_to_each')?['pdc_projectid']}"
},
"authentication": "@parameters('$authentication')"
}
},
"Apply_to_each_2": {
"foreach": "@outputs('List_records_2')?['body/value']",
"actions": {
"Increment_variable": {
"runAfter": {},
"type": "IncrementVariable",
"inputs": {
"name": "sumProduct",
"value": "@items('Apply_to_each_2')?['cr6ea_productkostprijs']"
}
},
"Increment_variable_2": {
"runAfter": {
"Increment_variable": [
"Succeeded"
]
},
"type": "IncrementVariable",
"inputs": {
"name": "sumLoon",
"value": "@items('Apply_to_each_2')?['cr6ea_loonkostprijs']"
}
}
},
"runAfter": {
"List_records_2": [
"Succeeded"
]
},
"type": "Foreach"
},
"Update_a_record": {
"runAfter": {
"Apply_to_each_2": [
"Succeeded"
]
},
"type": "OpenApiConnection",
"inputs": {
"host": {
"apiId": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps",
"connectionName": "shared_commondataserviceforapps",
"operationId": "UpdateRecord"
},
"parameters": {
"entityName": "pdc_projects",
"recordId": "@items('Apply_to_each')?['pdc_projectid']",
"item/cr6ea_kostprijsloon": "@variables('sumLoon')",
"item/cr6ea_kostprijsproducten": "@variables('sumProduct')"
},
"authentication": "@parameters('$authentication')"
}
},
"Set_variable_2": {
"runAfter": {
"Set_variable": [
"Succeeded"
]
},
"type": "SetVariable",
"inputs": {
"name": "sumLoon",
"value": 0
}
}
},
"runAfter": {
"Initialize_variable_2": [
"Succeeded"
]
},
"type": "Foreach",
"runtimeConfiguration": {
"concurrency": {
"repetitions": 1
}
}
},
"Initialize_variable_2": {
"runAfter": {
"Initialize_variable": [
"Succeeded"
]
},
"type": "InitializeVariable",
"inputs": {
"variables": [
{
"name": "sumLoon",
"type": "float"
}
]
}
}
}
Hello @KoenJanssensPD
Which License do you have?
Also how many records are being returned from CDS actions?
Could you share a screenshot with the actions opened up as much as possible from a Previous Run
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492