Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#26228 closed Bug (needsinfo)

500 Exceptions not logged if firewall blocks outgoing SMTP

Reported by: Ryan Fox Owned by:
Component: Error reporting Version: 1.9
Severity: Normal Keywords: logging
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I have Gunicorn/Django running on a server behind a firewall. I have logging set to go to a file as well as emailing the admins. The SMTP server is not local.

Apparently, if the firewall blocks outgoing SMTP connections, Gunicorn sees the worker time out and kills it. Nothing is written to the local logs.

Is there a way to specify the order of log handlers, or possibly just require the ones requiring a remote connection go last?

Thanks!

Change History (3)

comment:1 by Tim Graham, 9 years ago

Is there a problem if the value of settings.EMAIL_TIMEOUT is less than the value of Gunicorn's timeout?

I don't understand what change you're proposing.

comment:2 by Tim Graham, 9 years ago

Resolution: needsinfo
Status: newclosed

in reply to:  1 comment:3 by Ryan Fox, 9 years ago

Replying to timgraham:

Is there a problem if the value of settings.EMAIL_TIMEOUT is less than the value of Gunicorn's timeout?

I don't understand what change you're proposing.

I wasn't aware of that setting. At any rate, I was just wondering if it would be possible to log to the unlikely-to-fail handlers (e.g. writing to file) before logging to the possible-to-fail handlers (e.g. email). If this isn't feasible, I guess there's nothing to be done for it, but I thought it may be nice to safeguard against the contingency.

Note: See TracTickets for help on using tickets.
Back to Top