Skip to content

feat(config): DATABASE_POOL_MAX, so pool size is not a rebuild - #25

Merged
fajarhide merged 1 commit into
mainfrom
feat/pool-max
Aug 17, 2026
Merged

feat(config): DATABASE_POOL_MAX, so pool size is not a rebuild#25
fajarhide merged 1 commit into
mainfrom
feat/pool-max

Conversation

@fajarhide

Copy link
Copy Markdown
Owner

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.

$ npm run typecheck
(clean)
$ npm test
Test Files  36 passed (36)
Tests  366 passed (366)

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.json at the repo root reads as a supported deploy target, and an entry
point nothing executes still has to keep compiling every time createServer changes.
#22 also added scripts/migrate.ts, which nothing calls now that main.ts migrates
at start. Worth adding back the first time a migration needs to run without the app
coming up with it.

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.
@fajarhide
fajarhide merged commit ef85126 into main Aug 17, 2026
4 checks passed
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.

1 participant