connection-pooling-specialist

Diagnose PostgreSQL and Supabase connection exhaustion and configure Supavisor or PgBouncer pooling.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Whaleylaw/llm-lawyer --skill connection-pooling-specialist
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: connection-pooling-specialist
Source: https://github.com/Whaleylaw/llm-lawyer/tree/main/.claude/skills/connection-pooling-specialist
Command: npx skills add https://github.com/Whaleylaw/llm-lawyer --skill connection-pooling-specialist

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps diagnose and remediate database connection exhaustion, frequent connection timeouts, and inefficient pooling configurations in PostgreSQL and Supabase environments to restore application availability and reduce resource waste.

Core Features & Use Cases

  • Connection diagnostics: Identify active, idle, and long-running connections and surface root causes of "too many connections" errors.
  • Pooler configuration: Provide actionable guidance for Supavisor and PgBouncer configuration, pool modes, and sizing appropriate for serverless and long-lived workloads.
  • Application guidance: Recommend client-side pool settings, connection reuse patterns, and graceful shutdown practices to prevent leaks.
  • Use Case: Convert a fleet of serverless functions that were exhausting database connections into a pooled, low-latency architecture using Supavisor and tuned per-function pool sizes.

Quick Start

Inspect your Supabase/PostgreSQL connection metrics, switch serverless workloads to the pooled connection endpoint, and apply adjusted pool sizes per instance based on calculated connection requirements.

Frequently Asked Questions about connection-pooling-specialist

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

FAQPage Schema
Why does my Supabase serverless function keep throwing too many connections errors?

PostgreSQL connection pooling uses PgBouncer or Supavisor to multiplex many client connections over a small set of database backends. This prevents connection exhaustion by reusing established database sessions across multiple application requests, drastically reducing connection overhead.

How do I configure Supavisor for serverless PostgreSQL workloads?

Diagnosing PostgreSQL connection exhaustion requires inspecting active, idle, and long-running queries to find the root cause of timeouts. Analyzing these connection states reveals whether client-side connection leaks or insufficient pool sizing are depleting available database backends.

Does PgBouncer work well with Supabase serverless functions?

Connection pooling is necessary for serverless PostgreSQL deployments because rapidly scaling compute instances quickly exhaust fixed database connection limits. Without a pooler like Supavisor or PgBouncer, each function invocation risks opening a direct database connection, causing immediate timeouts and application unavailability.

What is the best way to prevent idle connection buildup in PostgreSQL?

The best way to prevent idle connection buildup in PostgreSQL is implementing tuned pool sizes and graceful shutdown practices. Using Supavisor or PgBouncer configuration guidance ensures efficient connection reuse and eliminates idle sessions that waste database resources.