On concurrency limits - I have set a concurrency l...
# ask-community
s
On concurrency limits - I have set a concurrency limit, and am running flows with the proper tag. However, I can see that the number of flows actively running are greatly exceeding my limit, and some of them are crashing, likely due to OOM. Why isn't the # of flows being throttled? I can see that the "Active Task Runs" is None next to the limit
n
hi @Sean Conroy - how are you setting your concurrency limits? tags are used for task run concurrency docs
s
@Nate Thanks so much for the response. OK that makes more sense then - I was trying to use concurrency limits on flows, not tasks. We have a pretty complicated flow of flows, which was necessary because tasks cannot call other tasks. So we called most everything a flow. What would you recommend in this scenario for restricting concurrency?
The problem is, right now I have flows that call flows that call tasks. I wish I could have flows that call tasks that call tasks. Unfortunately I think the solution may be that I need to have flows that call tasks that call undecorated functions, at least in order to get the concurrency limits to work.
n
hmm yeah I understand the tradeoff you need to make here. In general I don't expect any change to the restriction that tasks cannot call tasks, so reducing the number of decorated functions might be necessary - though oftentimes I find that there's some consolidation that can take place in the functional design of the flows that makes concurrency easier to reason about without a large compromise in observability. its hard to give concrete recommendations on concurrency and task/flow structure without seeing the code though - would you be willing to share a version of your workflow?