role-database:connection-management

Configure database connection pooling across PostgreSQL and MySQL engines.

14|3|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/rnavarych/alpha-engineer --skill role-database-connection-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: role-database:connection-management
Source: https://github.com/rnavarych/alpha-engineer/tree/main/plugins/roles/role-database/skills/connection-management
Command: npx skills add https://github.com/rnavarych/alpha-engineer --skill role-database-connection-management

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenges of inefficient database connection management, which can lead to performance bottlenecks, resource exhaustion, and application instability.

Core Features & Use Cases

  • Connection Pooling: Manages and reuses database connections efficiently across various engines (PostgreSQL, MySQL) using tools like PgBouncer, pgcat, and ProxySQL.
  • Pool Sizing & Optimization: Provides guidance on calculating optimal pool sizes and configuring application-level pooling (Prisma, SQLAlchemy, HikariCP, Go's database/sql).
  • Serverless Strategies: Explains connection strategies for serverless environments.
  • Leak Detection: Offers methods to detect and prevent connection leaks.
  • Use Case: When setting up a new microservice that connects to a PostgreSQL database, use this Skill to configure PgBouncer for optimal transaction pooling and determine the appropriate max connection setting for your application's pool.

Quick Start

Configure PgBouncer for transaction pooling with a maximum of 50 server connections per database.

Frequently Asked Questions about role-database:connection-management

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

FAQPage Schema
How do I configure PgBouncer for transaction pooling with a PostgreSQL database?

PgBouncer for PostgreSQL transaction pooling is configured by setting the pool mode to transaction and limiting server connections per database, such as a maximum of 50. This efficiently reuses connections and prevents resource exhaustion during microservice database access.

What is the best way to calculate optimal database connection pool sizing?

Optimal database connection pool sizing is calculated by analyzing your application's concurrent request volume and database capacity, ensuring the max connection setting balances throughput against resource exhaustion for engines like PostgreSQL and MySQL.

How does connection pooling work in serverless environments?

Connection pooling in serverless environments works by using external poolers like PgBouncer or ProxySQL to manage and reuse database connections, preventing connection exhaustion when serverless functions scale rapidly and generate high concurrency spikes.

Can I use Prisma or SQLAlchemy for application-level database connection pooling?

Yes, you can use Prisma or SQLAlchemy for application-level database connection pooling. These frameworks manage connection reuse directly within the application, reducing overhead and improving performance for PostgreSQL and MySQL databases.

How do I detect and prevent database connection leaks in PostgreSQL and MySQL?

Detect and prevent database connection leaks in PostgreSQL and MySQL by monitoring active connection counts against pool limits and ensuring connections are properly closed or returned to the pool after transaction execution.

Why does ProxySQL help with MySQL connection management?

ProxySQL helps with MySQL connection management by acting as an intermediary pooling layer that reuses connections, optimizing pool sizing, and preventing resource exhaustion when multiple application instances connect to the same MySQL database.