I’ve been experiencing issues with downloading a document, updating fields via the API, and even updating fields on the website for the past few days. Whenever I attempt to perform any of these actions, I receive the following error message:
Copy
{
"error": "Too many backlogged requests for document dddd - try again later?"
}
This issue seems to be affecting both API interactions and direct website usage. I’m not sure what’s causing this problem or what it means. Has anyone else encountered this issue? If so, how did you resolve it? Any insights or suggestions would be greatly appreciated.
Hi Sao, from the few characters of the ID I see, this rings a bell for a doc that’s been showing up in as problematic in ops alerts (does it start with 5R25U?). That’s usually a sign of something just exceeding the kind of service practical on a shared SaaS and starting to need an upgrade of some kind.
Specifically, the error means that the document is already trying to service MAX_PARALLEL_REQUESTS_PER_DOC requests and will refuse to take more work on until one of those requests completes. Otherwise there’s a danger of on a shared SaaS of one slow document creating an unbounded queue of work and bringing everyone down.
With a dedicated server or self-hosting, you can change MAX_PARALLEL_REQUESTS_PER_DOC. More generally, it is a good idea to see if the document is having performance problems, e.g. by running timing on formulas, or if some API requests can be pruned or done less frequently.
For 1, reloading the document may be worth trying, depending on the problem.
For 3, Grist’s internal snapshot system may be contributing to the backlog, since if it detects delays in making snapshots then it may hold new work until snapshots catch up. To make your own backups via the UI or otherwise, that requires API access, so yes that’s a problem.
For 4, it can be fairly obvious - if you go to edit the document and some edits take seconds, then some formula really needs rewriting, and definitely you don’t want API requests coming in faster than that rate or you’ll get a backlog building up.