Issue with Document Download, API Updates, and Website Field Updates

Hello everyone,

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.

Thank you in advance for your help!

Best regards,

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.

1 Like

Hi Paul,

Yes, you’re correct - this is indeed my document that starts with 5R25U. Thank you for the explanation.

I understand that the error means my document has hit the maximum parallel requests limit and is refusing new work to prevent overloading the system.

A few questions:

  1. Is it possible to cancel all current waiting/pending requests for this document to clear the backlog?
  2. How can I investigate what’s causing this performance issue? You mentioned checking formula timing - could you provide more details on how to do this?
  3. Am I correct that I won’t be able to create backups of this document until this issue is resolved?
  4. What would be the best approach to identify which operations or API requests might be causing the bottleneck?

If I can clear the current requests, it might help reset the situation and allow me to investigate the root cause more effectively.

Thank you for your help.

For 2, there is:

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.

Hi @Sao, I’m looking into a problem on our side. Sorry for the disruption! Document reloads may indeed be worth trying.

@Sao a fix has been applied. If this problem recurs, I’d appreciate if you let me know! Thanks.