I really don't understand the mutations and query limits
Can someone please explain to me in depth how the limits work because, I did not understand the docs: https://docs.convex.dev/functions/query-functions#limits
My hackathon idea has the potential to make a ton to reads and writes, so I need to know.
Queries | Convex Developer Hub
Queries are the bread and butter of your backend API. They fetch data from the
5 Replies
This is the best reference for function limits: https://docs.convex.dev/production/state/limits#functions
Reply back if there's anything specific in there that doesn't make sense.
Limits | Convex Developer Hub
We’d love for you to have unlimited joy building on Convex but engineering
Hey @emee , which aspect of the limits did you not understand?
Read/write limit errors
To ensure uptime and guarantee performance, Convex will catch queries and mutations that try to read or write too much data. These limits are enforced at the level of a single query or mutation function execution. The limits are:
Queries and mutations error out when:
More than 16384 documents are scanned
More than 8MiB worth of data is scanned
More than 4096 queries calls to db.get or db.query are made
The function spends more than 1 second executing Javascript
In addition, mutations error out when:
More than 8192 documents are written
More than 8MiB worth of data is written
// Does the above mean that a single mutation function cannot write more than 8192 documents in a single call.
I ask this because my hackathon project involves creating an sdk that will infinitely write more data than the limits specified above for a single project using it.
That does sound like an issue. You probably want to restructure your backend to avoid doing so many reads and writes
ok