So I'm a bit frustrated. My org is hitting the 20...
# ask-community
s
So I'm a bit frustrated. My org is hitting the 2000 API / calls a minute rate limit, and to resolve this, I'm needing to remove a bunch of @flow and @task decorators from all my functions. Fewer flows and tasks = fewer hits to the API. This is somewhat ironic...we're now paying to have much less "prefect-esqe" solution, just because we want to scale this thing. Has anyone else hit this scaling problem, and have another way to resolve it?
d
I'm guessing you have a lot of concurrency going on? If so, try using tags to limit the number of concurrent tasks. https://docs.prefect.io/2.10.13/concepts/tasks/#task-run-concurrency-limits
I actually should check if that prevents the tasks from being submitted until another finishes. I'll leave it to you to check.
If that doesn't work, I have a batch map executor you can copy. https://github.com/dominictarro/Borderlands/blob/main/borderlands/utilities/tasks.py
s
Thanks so much @Dominic Tarro. Yes I'm using the task concurrency limits...and I will check out your batch map executor!
👍 1
z
@Sean Conroy have you talked to our sales team about your use-case? We need concurrency limits to prevent accounts from degrading other user’s experiences. We’re interested in working with our customers to find solutions that do not require you to stop using Prefect features.
j
@Sean Conroy I’m running into a similar issue with the API limit, however, mine has to do with a flow erroring and now it’s thousands of jobs behind and I have no easy way to remove those jobs and start fresh.
g
Hey all! Let me know if we can answer some of your account questions, I’d be happy to hop on a call with our solutions engineers to help get you unblocked
s
@Jarvis Stubblefield I've run into the same thing as well. Looks like Jake sent you a script. @Zanie and @George Coyne Thanks - I have not talked to anyone on the sales team, but I would be happy to talk more about our use case and see if we can increase or (hopefully) remove the API limit here. Just le mw know...anytime tomorrow will work