Opened 3 weeks ago

Closed 3 weeks ago

#36745 closed New feature (worksforme)

native support for database connection pooling in Django.

Reported by: Pravin Owned by: Pravin
Component: Database layer (models, ORM) Version: 5.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In Django, CONN_MAX_AGE helps with persistent connections, but it doesn’t provide true connection pooling like you’d get with SQLAlchemy in FastAPI or similar frameworks.

In contrast, SQLAlchemy gives you:

  • Configurable pool sizes
  • Queueing and timeout behavior
  • Recycle/reconnect logic
  • Pool health insights

This makes a huge performance difference for apps with high concurrency, short-lived processes (e.g. in serverless), or async workflows.

Change History (1)

comment:1 by Jacob Walls, 3 weeks ago

Resolution: worksforme
Status: assignedclosed

Connection pooling for postgres was added in 5.1, and for oracle in 5.2. Both allow configuring pool sizes, and likely other options as well. I'm not sure what else you are proposing to add here. New features should be discussed first at django/new-features. Please be as specific as you can with your proposal, and take into account what already exists.

Note: See TracTickets for help on using tickets.
Back to Top