Skill
Database Connection Pooling
Sizes and configures database connection pools, and diagnoses exhausted pools, leaked connections and idle-in-transaction sessions.
1A pool protects the database. Bigger is rarely better.
2Steps
31. Collect facts: database max connections, number of app instances and workers, pool settings per process, and typical query time. Total possible connections = instances x workers x pool max. Compare to the database limit with headroom for admin and migrations.
42. Size it. A database does best with roughly (cores x 2) + disk spindles active connections. For most apps a pool of 10 to 20 per instance is plenty; if you need more, queries are too slow or transactions too long.
53. Set the pool knobs deliberately: max size, min idle, acquire timeout (fail in a few seconds, not minutes), max connection lifetime (shorter than any proxy or firewall idle timeout), and validation or keepalive.
Claude CodeCodex
Database Connection Pooling
SkillDatabases
Free