connection-pooling

Size connection pools and diagnose failure modes for Postgres/MySQL workloads.

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/jacob-balslev/skill-graph --skill connection-pooling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: connection-pooling
Source: https://github.com/jacob-balslev/skill-graph/tree/main/marketplace/skills/connection-pooling
Command: npx skills add https://github.com/jacob-balslev/skill-graph --skill connection-pooling

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Connection pooling prevents application workloads from stalling or failing due to limited, expensive database connections, by guiding correct pool sizing, correct proxy/pool mode selection, and fast diagnosis of connection-related failure modes.

Core Features & Use Cases

  • Pool sizing with queueing math: Applies Little’s Law and workload concurrency to calculate an appropriate pool size that avoids contention.
  • Application vs proxy pooling guidance: Explains how in-process pools (HikariCP, pgx pool, node-postgres Pool) differ from proxy pools (PgBouncer/ProxySQL) and how that changes behavior.
  • PgBouncer mode compatibility checks: Covers session, transaction, and statement pooling and how each mode affects feature compatibility (e.g., prepared statements, SET variables, cursors).
  • Failure-mode diagnostics: Identifies causes and first checks for symptoms like too many connections, idle-in-transaction leaks, reconnect storms, and pooling-mode-specific prepared-statement issues.
  • Operational verification checklist: Promotes instrumentation and guardrails (acquire/wait metrics, timeouts, connection rotation, reconnect backoff, partitioning pools by query length).

Quick Start

Use the skill to calculate a safe connection pool size for your peak concurrency workload, then choose the appropriate PgBouncer mode and verify feature compatibility for your application.

Frequently Asked Questions about connection-pooling

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

FAQPage Schema
How do I calculate the right database connection pool size for my workload?

Calculate database connection pool size by applying Little’s Law to your peak workload concurrency, ensuring the pool handles throughput without causing connection contention or exhaustion.

What is the difference between application connection pools and proxy pools like PgBouncer?

Application connection pools like HikariCP or node-postgres manage connections in-process, while proxy pools like PgBouncer or ProxySQL sit between the application and database, changing how session, transaction, and statement pooling behaviors work.

Does PgBouncer transaction pooling break prepared statements?

PgBouncer transaction pooling can break prepared statements because statement pooling and transaction pooling modes alter session state, requiring feature-compatibility auditing for prepared statements, SET variables, and cursors before deployment.

Why does my application keep hitting too many connections errors?

Too many connections errors occur when database connection pool sizing is incorrect or connections leak, requiring failure-mode diagnostics to check for reconnect storms, idle-in-transaction leaks, and missing connection timeouts.

How do I prevent idle in transaction leaks in Postgres connection pools?

Prevent idle in transaction leaks in Postgres connection pools by configuring connection timeouts, implementing acquire and wait metrics instrumentation, and verifying connection rotation and reconnect backoff guardrails.

When should I partition database connection pools by query length?

Partition database connection pools by query length when operational verification reveals long-running queries blocking short transactions, ensuring fast queries are not stalled by resource-heavy operations sharing the same pool.