prisma-connection-pool-exhaustion

Configure Prisma pooling and singleton client for serverless deployments.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/PhamMinhHaiAu-12035071/cursor-pro-max --skill prisma-connection-pool-exhaustion-phamminhhaiau-12035071
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-connection-pool-exhaustion
Source: https://github.com/PhamMinhHaiAu-12035071/cursor-pro-max/tree/main/.claude/skills/claudeception/examples/prisma-connection-pool-exhaustion
Command: npx skills add https://github.com/PhamMinhHaiAu-12035071/cursor-pro-max --skill prisma-connection-pool-exhaustion-phamminhhaiau-12035071

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill fixes Prisma connection pool exhaustion in serverless environments by implementing pooling strategies and safe Prisma client usage to prevent excessive connections.

Core Features & Use Cases

  • Connection pooling guidance: introduces pooling services (PgBouncer, Prisma Accelerate) to cap active connections.
  • Safe client lifecycle: demonstrates singleton PrismaClient to avoid per-request clients.
  • Verification guidance: provides steps to validate that connections stay within limits under load.

Quick Start

Implement a pooling strategy for Prisma in your serverless app and configure a singleton Prisma client to reduce cold-start connection spikes.

Frequently Asked Questions about prisma-connection-pool-exhaustion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Prisma connection pool exhaustion in serverless environments?

To fix Prisma connection pool exhaustion in serverless environments, implement connection pooling infrastructure like PgBouncer or Prisma Accelerate, and use a singleton PrismaClient to prevent connection leaks during high concurrency.

What is the best way to configure a Prisma client for AWS Lambda or Vercel?

The best way to configure a Prisma client for AWS Lambda or Vercel is to instantiate a singleton PrismaClient globally. This prevents per-request client creation, significantly reducing cold-start connection spikes and avoiding pool exhaustion.

Why does my Prisma serverless app exceed the PostgreSQL connection limit under load?

Your Prisma serverless app exceeds the PostgreSQL connection limit under load because each serverless function instance creates new Prisma clients. Introducing a pooler like PgBouncer caps active connections and stabilizes the database.

Does this Prisma connection pooling guidance work with Netlify Functions and MySQL?

Yes, this Prisma connection pooling guidance applies to Netlify Functions using MySQL or PostgreSQL. It enforces safe client lifecycle practices and datasource configuration to mitigate connection leaks under high concurrency.

How do I verify that Prisma connection pooling prevents leaks under high concurrency?

To verify that Prisma connection pooling prevents leaks under high concurrency, follow the provided verification guidance to validate that active database connections stay strictly within configured limits during load testing.

Do I need Prisma Accelerate to prevent connection pool exhaustion in serverless apps?

You do not strictly need Prisma Accelerate to prevent connection pool exhaustion in serverless apps. You can alternatively use PgBouncer or similar pooling infrastructure alongside a singleton Prisma client to cap active connections.