Technical exception page/emails crash when the database is down
The technical 500 debug view and admin email shows the currently logged in user.
However, if the database is shutting down or is unavailable, anything that involves the ORM raises OperationalError
s. Turning request.user
into a string in the template rendering will cause and exception which will cause the rendering to crash. Crashes in the error reporting itself cause hard to debug problem which can be hard to follow (especially for beginners).
I propose that we should catch exceptions when retrieving the user details and state that the user could not be shown while still showing everything else.
PR: https://github.com/django/django/pull/7656
Change History
(5)
Description: |
modified (diff)
|
Owner: |
set to Andreas Pelme
|
Status: |
new → assigned
|
Triage Stage: |
Unreviewed → Accepted
|
Version: |
1.10 → master
|
Severity: |
Normal → Release blocker
|
Summary: |
Avoid crashes in tecnical exception page/emails when the database is down → Technical exception page/emails crash when the database is down
|
Version: |
master → 1.10
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
This qualifies for a backport to 1.10 since it's a bug in a new feature (#25037).