https://prefect.io logo
Title
l

Ling Chen

03/04/2022, 5:46 PM
Hello ! We have some memory intensive flows. These flows sometimes are triggered at the same time and executed through a LocalExecutor. The LocalExecutor will immediately launch all flow runs and cause memory errors. I wonder if there is a way to make LocalExecutor or any executor to execute one flow run at a time (sequentially) rather than launch all of flow runs at the same time?
k

Kevin Kho

03/04/2022, 5:58 PM
Hi Ling, we have Flow Run Concurrency Limits for that
👀 1
l

Ling Chen

03/04/2022, 6:00 PM
Is there a way to do that with custom server then? (We are using both cloud and custom server for different use cases).
k

Kevin Kho

03/04/2022, 6:03 PM
This is not a Server feature for Prefect 1.0 but it is something 2.0 supports in the free version
You have to do it in the state handler with the GraphQL API calls and then if you find that there is more than 1 flow in the running state, just use time.sleep()
l

Ling Chen

03/04/2022, 6:35 PM
I see! Good idea. Thanks! Looking forward to Prefect 2.0