﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30646	close_if_unusable_or_obsolete fails to close unusable connections.	Daniel Neuhäuser	nobody	"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."	Bug	closed	Database layer (models, ORM)	dev	Normal	wontfix			Unreviewed	0	0	0	0	0	0
