#29073: CONN_MAX_AGE and others not being picked up from settings file
-------------------------------------+-------------------------------------
Reporter: Karl | Owner: nobody
Kuehn |
Type: Bug | Status: new
Component: Database | Version: master
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 |
-------------------------------------+-------------------------------------
In trying to solve some performance issues I am observing (probably our
code) I tried to use the `CONN_MAX_AGE` setting documented here:
https://docs.djangoproject.com/en/2.0/ref/settings/#conn-max-age
I have a `pgbouncer` instance setup, so it was easy to observe connections
going to the database, and I found that regardless of that setting the
connections were being dropped at the end of every request, regardless of
what value I set (even invalid ones have no effect).
Using `git grep CONN_MAX_AGE | grep '\.py:'` I found that this value is
never being read from the settings file, and only defaulted in
`django/db/utils.py:ConnectionHandler.ensure_defaults()`. This is true
both on current (as of this writing) `master` and version 1.11.1 (what we
are currently using). It may well go farther back than that, but I have
not checked.
I also checked `ATOMIC_REQUESTS`, and `AUTOCOMMIT` and they show the same
pattern. Other values there are more complicated, and I did not check.
--
Ticket URL: <https://code.djangoproject.com/ticket/29073>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.6feb7be4385ac0cd9c6c00d984344128%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.