#30646: close_if_unusable_or_obsolete fails to close unusable connections
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
dneuhaeuser-zalando |
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 |
-------------------------------------+-------------------------------------
BaseDatabaseWrapper.close_if_unusable_or_obsolete doesn't always close
unusable connections. A connection is only tested for usability, if an
error has occurred on that connection previously. However a connection
might be unusable for other reasons such as database failover.
As we run databases in Kubernetes (using https://github.com/zalando
/postgres-operator), a database failover is not an unusual scenario and
not of any concern. However on employee-facing internal applications that
see relatively low traffic, this leads to a number of requests failing
with 500s on every failover. We've patched this in our applications but it
would be nice to see this fixed in Django itself.
Fixing this does incur the cost of a roundtrip to the database with every
request but this doesn't appear to have any significant impact on latency.
--
Ticket URL: <https://code.djangoproject.com/ticket/30646>
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/062.c79e1bda203a1aaa99e7fe30af8e1e12%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.