How many scheduled functions can be ran in parallel?
I find that I hit this limit very quickly and the scheduled functions quickly spiral to more than 1000+ if I have actions that spawn new actions. How many functions can run in parallel now and is it possible to increase this limit?
5 Replies
Also, even though I can manage the queue size by adding more delay to the runAfter, this still clogs up the queue whenever it happens, causing any user experience that relies on actions to freeze while I am running batch jobs. Is it possible to prioritize and "reserve" actions for user actions?
using delays to manage the queue size also makes it quite suboptimal: for example, when user activity is low, I should take the opportunity to clear as many batch jobs as possible, but when user activity is high, I should pause batch jobs to focus on user requests.
Hey @milk enjoyer, we run 10 functions in parallel, and will likely increase it for the Pro plan in the near future.
The other functions concurrently scheduled will run eventually, so you shouldn't have to "manage the queue" yourself.
Perhaps you can decrease the number of scheduled functions with your backend logic?
Unfortunately, that is just not possible as I am dealing with a large amount of data, and I am already batching them whenever I can. Also, wouldn't I have to "manage the queue" if I want any user-initiated actions to run instantly instead of having to wait till it is the top 10?
Please keep me posted, I am already on the pro plan and more parallel functions would be a great help
We have a function concurrency scale-out project that's getting very close to shipping. See ( https://discord.com/channels/1019350475847499849/1019372556693815418/1204501336150769704 ). we also intend for you to be able to have more control over your concurrency down the road once this scaling stuff (raise your limit somewhat arbitrarily) is in place (for pro accounts). @presley might have more insight if fun run would help here
That sounds amazing, Looking forward to it!