How does your team advise for scaling concurrency ...
# ask-community
j
How does your team advise for scaling concurrency in Agents? My LocalAgent crashes once too many flows are submitted and concurrently running (roughly 300) -- and I believe this is because too many subprocesses are created, causing my computer to kill the parent process.
s
This is a big issue for me as well (using the docker agent each flow loads an entire docker container, which means if you have more than a handful you run out of ram and CPU). Id recommend showing support for this issue: https://github.com/PrefectHQ/server/pull/90 which is requesting concurrency limits.
j
Ah nice. I'll post something in there as well. Thank you!
s
If you manage to find an interim solution or workaround, please let me know, Ive been butting heads with this for a while!
j
I have a fix for LocalAgent and will write that up for you now!
what is your github username? so I can @ you in my comment
s
samreay 🙂
But also that would be amazing. If so Ill stop using the docker agent and just have a dockerised local agent
j
Alright so I wrote up a comment, but after reading the rest of that issue, I'm not sure it applies there. That post is about concurrent flow runs managed by the Server/Cloud, whereas we are talking about managing flow runs for a given Agent.
Anyways, I posted it in that thread. I haven't tried the workaround yet but maybe my suggestion will help you. https://github.com/PrefectHQ/server/pull/90#issuecomment-796897974
s
Awesome, good idea there, lets see if we can get a dev feedback soon because I would dearly like it if I could trust my environment to be stable! @Zanie, any thoughts on this proposed lightweight solution?
z
Hey guys, I'll aim to talk to the team about this today and get back to you.