Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow overriding MAX_PARALLEL_REQUESTS_PER_DOC from env #920

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nafg
Copy link

@nafg nafg commented Mar 28, 2024

No description provided.

@@ -98,7 +98,7 @@ import { Document } from "app/gen-server/entity/Document";
// Cap on the number of requests that can be outstanding on a single document via the
// rest doc api. When this limit is exceeded, incoming requests receive an immediate
// reply with status 429.
const MAX_PARALLEL_REQUESTS_PER_DOC = 10;
const MAX_PARALLEL_REQUESTS_PER_DOC = process.env.MAX_PARALLEL_REQUESTS_PER_DOC || 10;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be called with parseInt ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nafg are you interested in completing this work? It would be a useful improvement, you are not the first to want this number to be customizable.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Support said there was no point since it's just a queue over a single request at a time bring processed, IIUC.

Either way, it was an urgent need and had already been utterly disastrous for my client. I had written an IVR for them using Grist as the persistence and admin UI and that was a big mistake. Instead I had to do a marathon migration to a proper RDBMS with a custom UI.

Migrating could have been easier too, if the sqlite data was somewhat normalized (e.g. values in Boolean columns were in all different formats) so I could use pgloader. The only sane way ended up being to write a custom script against the rest API.

So in the end migrating from the SaaS to self -hosted was a waste of time. It's unclear whether this PR would have changed that but by now it's far too late and it's no longer useful to me.

Of course no one's to blame, but I wish these limitations would have been much advertised much more prominently and clearly up front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants