#33584: Encourage using persistent database connections
-------------------------------------+-------------------------------------
Reporter: Tom | Owner: nobody
Carrick |
Type: New | Status: assigned
feature |
Component: Database | Version: dev
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Sometimes I'm asked to review a Django project's performance. The most
typical issues are probably N+1 selects and wasting time creating
connections.
I propose encouraging setting `CONN_MAX_AGE` to a non-zero value by:
- Setting `CONN_MAX_AGE` to `None` or a reasonably high value in the
generated `settings.py` - but keeping the default as-is for compatibility.
- Adding a deployment level system check to guard against a zero value.
Anyone who needs this to be `0` can easily change it and silence the
system check, but I think most projects will benefit from this.
--
Ticket URL: <https://code.djangoproject.com/ticket/33584>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107017f9d265b38-87bab3d3-4bdb-4c9a-8c29-bb870573bc66-000000%40eu-central-1.amazonses.com.