[Django] #26228: 500 Exceptions not logged if firewall blocks outgoing SMTP

3 views
Skip to first unread message

Django

unread,
Feb 17, 2016, 1:57:25 AM2/17/16
to django-...@googlegroups.com
#26228: 500 Exceptions not logged if firewall blocks outgoing SMTP
---------------------------------+---------------------
Reporter: ryanfox | Owner:
Type: Bug | Status: new
Component: Error reporting | Version: 1.9
Severity: Normal | Keywords: logging
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+---------------------
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!

--
Ticket URL: <https://code.djangoproject.com/ticket/26228>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 17, 2016, 8:14:22 AM2/17/16
to django-...@googlegroups.com
#26228: 500 Exceptions not logged if firewall blocks outgoing SMTP
---------------------------------+--------------------------------------

Reporter: ryanfox | Owner:
Type: Bug | Status: new
Component: Error reporting | Version: 1.9
Severity: Normal | Resolution:

Keywords: logging | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

Is there a problem if the value of
[https://docs.djangoproject.com/en/stable/ref/settings/#email-timeout
settings.EMAIL_TIMEOUT] is less than the value of Gunicorn's timeout?

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

--
Ticket URL: <https://code.djangoproject.com/ticket/26228#comment:1>

Django

unread,
Feb 18, 2016, 7:51:14 AM2/18/16
to django-...@googlegroups.com
#26228: 500 Exceptions not logged if firewall blocks outgoing SMTP
---------------------------------+--------------------------------------
Reporter: ryanfox | Owner:
Type: Bug | Status: closed

Component: Error reporting | Version: 1.9
Severity: Normal | Resolution: needsinfo

Keywords: logging | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by timgraham):

* status: new => closed
* resolution: => needsinfo


--
Ticket URL: <https://code.djangoproject.com/ticket/26228#comment:2>

Django

unread,
Feb 23, 2016, 7:37:34 PM2/23/16
to django-...@googlegroups.com
#26228: 500 Exceptions not logged if firewall blocks outgoing SMTP
---------------------------------+--------------------------------------
Reporter: ryanfox | Owner:
Type: Bug | Status: closed

Component: Error reporting | Version: 1.9
Severity: Normal | Resolution: needsinfo

Keywords: logging | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------

Comment (by ryanfox):

Replying to [comment:1 timgraham]:


> Is there a problem if the value of
[https://docs.djangoproject.com/en/stable/ref/settings/#email-timeout
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/26228#comment:3>

Reply all
Reply to author
Forward
0 new messages