Skip to content

Set an explicit Prisma pool timeout - #1147

Open
Klakurka wants to merge 1 commit into
masterfrom
cursor/prisma-pool-timeout-config-22bf
Open

Klakurka wants to merge 1 commit into
masterfrom
cursor/prisma-pool-timeout-config-22bf

Conversation

@Klakurka

@Klakurka Klakurka commented Nov 7, 2026

Copy link
Copy Markdown
Member

Related to #

Description

DATABASE_URL set connection_limit but not pool_timeout, so Prisma waited the default 10 seconds for a free connection. This adds MAIN_DB_POOL_TIMEOUT=20 to the app and shadow URLs in .env and .env.test.

connection_limit stays 50. Lower it only after the read and persist fixes are in production, sized as MySQL max_connections divided by the number of Node processes.

If production sets DATABASE_URL outside this file, add pool_timeout there as well.

Test plan

  • Confirm the deployed DATABASE_URL contains pool_timeout=20.
  • No application code change.
Open in Web Open in Cursor 

Surface MAIN_DB_POOL_TIMEOUT (20s) in the connection string so pool
checkout waits are intentional and adjustable, instead of relying on
Prisma's implicit 10s default.

Co-authored-by: David <Klakurka@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5be99160-9526-4e07-89c7-7b03df58c07b
Commits

Reviewing files that changed from the base of the PR and between cac26a3 and b054390.

Files selected for processing: 2

  • .env
  • .env.test
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
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