#34167 closed Cleanup/optimization (wontfix)
Set a reasonable default for EMAIL_TIMEOUT
Reported by: | Federico Capoano | Owned by: | nobody |
---|---|---|---|
Component: | Core (Mail) | Version: | 4.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Why there's no default for EMAIL_TIMEOUT?
Applications built in Django can potentially stall indefinitely if email
sending starts to hang (eg: if the SMTP server is overloaded), when this
happens, since there's no timeout, there's also no error being logged, so
it's very hard and time consuming to debug.
Wouldn't it be better to set a timeout? Some high value like 2 minutes
which wouldn't really make sense to wait any longer, so at least if and
when this happens, developers will find error traces in the logs and
quickly understand where the problem is coming from, instead of spending
hours to debug it like I did in the past week.
Change History (3)
comment:1 by , 2 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 2 years ago
Description: | modified (diff) |
---|
For the record, I started a discussion in the Django Developers Mailing List: https://groups.google.com/g/django-developers/c/XZbKeM8fVxU/m/jp0h8U4tBgAJ .
comment:3 by , 2 years ago
Description: | modified (diff) |
---|
If timeout is unspecified, SMTP backend will use
socket.getdefaulttimeout()
, so adding a default value forEMAIL_TIMEOUT
would be backward incompatible for all projects that set a default timeout for sockets.Initially closing as "wontfix". Please first start a discussion on the DevelopersMailingList., where you'll reach a wider audience and see what other think, and follow triaging guidelines with regards to wontfix tickets. If you can get consensus on a proposal on the DevelopersMailingList, we can reopen the ticket. Thanks!