python.sqlalchemy.connection_pool
Stability
High
Detects SQLAlchemy without proper connection pool configuration.
Why It Matters
Section titled “Why It Matters”Poor pool configuration:
- Connection exhaustion — Pool runs out
- Stale connections — Dead connections in pool
- Memory leaks — Connections not recycled
Example
Section titled “Example”# ❌ Before (default pool settings)engine = create_engine('postgresql://...')# ✅ After (proper pool configuration)from sqlalchemy import create_engine
engine = create_engine( 'postgresql://...', pool_size=5, max_overflow=10, pool_timeout=30, pool_recycle=1800, # Recycle connections every 30 min pool_pre_ping=True, # Test connections before use)What Unfault Detects
Section titled “What Unfault Detects”- Missing pool_size configuration
- No pool_recycle (stale connections)
- Missing pool_pre_ping