Skip to content

Allow configuring max DB connection pool size via DB_POOL_MAX - #5

Merged
stplasim merged 3 commits into
mainfrom
ab-530-allow-to-define-the-max-pool-size
Jul 27, 2026
Merged

Allow configuring max DB connection pool size via DB_POOL_MAX#5
stplasim merged 3 commits into
mainfrom
ab-530-allow-to-define-the-max-pool-size

Conversation

@stplasim

Copy link
Copy Markdown
Contributor

Summary

  • Add optional DB_POOL_MAX env var (default: 10) to control the max connections in the DB connection pool
  • Extract requiredString/positiveInt env-parsing helpers into src/utils/env.ts and reuse them in src/db/client.ts and src/slack/app.ts
  • Document the new variable in .env.example and installation.md

@stplasim
stplasim requested a review from alexlanz July 24, 2026 04:51
Comment thread src/db/client.ts Outdated
export const db = drizzle({
connection: {
url: requiredString('DATABASE_URL'),
max: positiveInt('DB_POOL_MAX', 10),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
max: positiveInt('DB_POOL_MAX', 10),
max: positiveInt('DATABASE_POOL_MAX', 10),

I would try to keep the prefix the same.

@stplasim
stplasim requested a review from alexlanz July 27, 2026 06:26
@stplasim
stplasim force-pushed the ab-530-allow-to-define-the-max-pool-size branch from 16088bb to 1ce2a95 Compare July 27, 2026 06:27
@stplasim
stplasim merged commit 4ecf1ef into main Jul 27, 2026
1 check passed
@stplasim
stplasim deleted the ab-530-allow-to-define-the-max-pool-size branch July 27, 2026 06:44
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.

2 participants