Skip to content

fix: reuse Prisma pools in production - #519

Merged
Producdevity merged 2 commits into
masterfrom
fix/production-prisma-pool-release
Nov 9, 2026
Merged

Producdevity merged 2 commits into
masterfrom
fix/production-prisma-pool-release

Conversation

@Producdevity

@Producdevity Producdevity commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Description

Production skipped the global Prisma cache, so separate Next.js server bundles could each create a five-connection pool. Overlapping containers exhausted Supabase’s fifteen-session pool during deployment. Cache the base client in production too, with a regression test using the real adapter.

No linked issue. This promotes the same pool fix through staging while preserving production’s newer dependencies and entire Prisma tree.

Type of change

  • Bug fix
  • Documentation update

How Has This Been Tested?

  • Local build
  • CI build
  • Lint
  • Typecheck
  • Unit tests: 2,214 passed
  • Manual testing: local PostgreSQL dropped from fifteen to five connections for three module instances; two fixed processes peaked at ten, with 120/120 queries passing.

Screenshots (if applicable)

Not applicable.

Checklist

  • Code follows project style
  • Self-review completed
  • Documentation updated
  • Local lint, typecheck and tests pass

Notes for reviewers

The first replacement must avoid overlapping the old process’s duplicate pools. Publish and pull the verified image before stopping the old app, then restore rolling updates after verification. Dependencies, schema and query behavior are unchanged.

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a72d6e0e-2efb-4efb-bd99-196bac1dcf70

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

View guided diff | Turn on auto-fix | Re-trigger cubic

@Producdevity
Producdevity merged commit 085d913 into master Nov 9, 2026
8 checks passed
@Producdevity
Producdevity deleted the fix/production-prisma-pool-release branch November 9, 2026 18:54
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