feat(config): DATABASE_POOL_MAX, so pool size is not a rebuild - #25
Merged
Conversation
Ten connections suits a server that owns its database. A 2 GB host wants fewer, and so does anything sitting behind a pooler that is already doing the sharing. Neither is worth editing code and building an image for.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pool size becomes an env var. Ten connections is right for a server that owns its
database, and wrong on a 2 GB host or behind a pooler that is already sharing
connections. Neither case is worth editing code and rebuilding an image.
This replaces #22, which also carried a Vercel entry point and a
vercel.json.The gateway is deployed next to its Postgres instead, so both were dead on arrival:
a
vercel.jsonat the repo root reads as a supported deploy target, and an entrypoint nothing executes still has to keep compiling every time
createServerchanges.#22 also added
scripts/migrate.ts, which nothing calls now thatmain.tsmigratesat start. Worth adding back the first time a migration needs to run without the app
coming up with it.