Django is not sending 500 error emails, AdminEmailHandler is not even triggering... what's going on?

293 views
Skip to first unread message

Robert Rollins

unread,
Mar 25, 2015, 3:47:59 PM3/25/15
to django...@googlegroups.com
I'm at my whit's end trying to debug this problem with one of my Django sites. I've done absolutely everything I can think of, and that google direct me to, to make it send 500 emails, but to no avail. For some reason I cannot fathom, even with every logging setting I know set to the Django 1.6 defaults, the AdminEmailHandler doesn't ever trigger.

Here's what I've got in terms of settings:

DEBUG=False
ADMINS = (('Admins', 'adm...@example.com'),)

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

LOGGING is not defined, so I'm using the Django defaults (which do send 500 emails in another site I have installed on the same machine). handler500 is not defined. Using the console EmailBackend means I don't have to worry about SMTP servers.

Sending emails inside a manage.py shell instance with django.core.mail.send_mail() pushes the email into the console just fine, so it's not the email config itself. 

Using PyDev to debug the execution, I see that AdminEmailHandler.emit() is never called, which appears to be because it's not in the list of handlers configured to deal with 500 errors. But WHY?! Even explicitly configuring AdminEmailHandler to handle django.request ERRORs by copying django.utils.log.DEFAULT_LOGGING doesn't work.

What is going on?! :(

Robert Rollins

unread,
Mar 25, 2015, 8:13:26 PM3/25/15
to django...@googlegroups.com
I'm also reasonably certain that this isn't limited to just AdminEmailHandler. It seems like *nothing* I set up as a logging handler for 500 errors gets triggered.
Reply all
Reply to author
Forward
0 new messages