Too many open queries
Unhandled Runtime Error
Where did I do wrong? Here is my mutation that causes the error (I think) My code might be messy so any advices not related to the issue but related to my convex code in general is appreciated as well
10 Replies
hi @whoami ! the error is saying you can't run more than 64 queries (
db.query(...)...
) in parallel. however, i agree this error doesn't make much sense anymore, so i'm removing it today and you shouldn't need to change your code. thanks for reporting!Hey @lee—I've run into this a number of times as well. Does this mean you're going to remove the concurrent queries limit altogether, or raise it to a larger number?
we're removing the concurrent queries limit altogether. there will still be limits on the number of queries & number of rows & number of bytes read within a single function, to make sure the function stays efficient. but concurrency-wise, you can go wild 🙂
Great, thanks!
I ended up denormalize the schema and it works now, I hope I can get these notifications earlier
also what does removing the limit mean? I assume it was there for some reason right?
sorry about that. i deployed the change a few hours ago, so it should be possible to do the pattern you were doing before. denormalization has its benefits though
the limit was in place before we added limits on total queries & reads (to prevent out-of-memory errors), and before we did queries async at all. with the new patterns opened up and new limits in place to prevent poor performance, the limit on concurrency can be lifted
Ok, I ran in to the limits on total queries previously and it got resolved via indexing, then I got the concurrent queries limit. I really hope I can get some headup on the resource limitations. What other limitations should I be aware of before it’s too late?
We can add a document with all limits. It is #queries, #rows read #of data read.
There are also limits on writes bytes and rows.
great point. we're working on making the limits more discoverable and less surprising. we have some ideas, but please let us know how you would like to discover them.
the limits center around building a fast, efficient API for a frontend app. so there are limits on reads and writes, and a limit on time spent in javascript -- mostly to prevent infinite loops.
I would say the best place to discover them is of course in the code editor, not sure if a vscode plugin would be possible for this