Skip to content

fix: configure PostgreSQL pool limits#126

Open
jamilahmadzai wants to merge 1 commit into
StellarTips:mainfrom
jamilahmadzai:feature/db-pool-tuning-57
Open

fix: configure PostgreSQL pool limits#126
jamilahmadzai wants to merge 1 commit into
StellarTips:mainfrom
jamilahmadzai:feature/db-pool-tuning-57

Conversation

@jamilahmadzai

Copy link
Copy Markdown

Summary

  • configure TypeORM runtime and migration data sources with explicit PostgreSQL pool settings from DB_POOL_SIZE, capped at 20 connections per instance
  • add idle/acquire timeouts, 1s slow-query warnings, and a warn-level pool saturation monitor for queued or fully busy pools
  • document pool tuning and add a k6 /health/ready load test that exercises the database-backed readiness path at 2x the profile-read baseline

Validation

  • npm ci
  • npm test -- config/database-pool.config.spec.ts config/postgres-pool-monitor.spec.ts --runInBand --coverage --collectCoverageFrom=config/database-pool.config.ts --collectCoverageFrom=config/postgres-pool-monitor.ts (100% line coverage on changed config/monitor files)
  • npm test -- --runInBand (115 tests)
  • npm run build
  • npm run lint
  • node --check test/load/db-pool-readiness.js
  • git diff --check

Closes #57

Bounty: GrantFox OSS campaign for issue #57

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.

Configure PostgreSQL connection pooling for production load

1 participant