Observing pool clients going into idle state
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 8.7k
- Forks
- 374
- Avg merge
- 11d 16h
- Merged PRs (30d)
- 1
Description
Hey,
For Vercel's Fluid Compute platform it is important to be able to observe when pool clients either become idle, so that the platform can ensure that VMs do not suspend while the idle timer is going (since that may "leak" connections). Details in this blog post https://vercel.com/blog/the-real-serverless-compute-to-database-connection-problem-solved and the implementation is in this file https://github.com/vercel/vercel/blob/94b9a307bef41ae96126b1376a621c650f0bcacd/packages/functions/src/db-connections/index.ts#L221
We support most popular DB pools, but it doesn't currently seem possible to support postgres.js
Advice on whether it is possible to do this would be greatly appreciated!
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the referenced Vercel implementation in packages/functions/src/db-connections/index.ts around line 221, then inspect how this repository manages PostgreSQL pool clients and their lifecycle. The issue does not name a target file or tests; done would require a concrete feasibility decision and a clearly scoped way to observe idle transitions, if supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs, postgresql
- Domain
- databases, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100