Switching to NullPool in SQLAlchemy 2.0 to Cut Database Connection Costs
Reducing Connection‑Related Costs with NullPool SQLAlchemy 2.0’s async engine defaults to NullPool , which creates a new connection for each use and closes it immediately afterward. This eliminates idle connections and can lower costs on providers that bill per active connection. Setting pool_size=0 or explicitly choosing NullPool ensures no persistent pool