ActionMailer does not timeout network connections by default #41244
Labels
Comments
Yes
Yes I think we should do both. I marked the issue with the "Good first issue", but if you want to do or get your customer involved with contributing to Rails, please go ahead. |
|
Unless @mperham wants to do it. I can make that PR |
|
Be my guest.
…On Tue, Jan 26, 2021 at 12:23 André Luis Leal Cardoso Junior < ***@***.***> wrote:
Unless @mperham <https://github.com/mperham> wants to do it. I can make
that PR
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a Sidekiq customer complaining of a lot of "stuck" threads. He sends a lot of email so I suspected misbehaving SMTP servers.
The
mailgem has support for timeouts here but they default tonil:https://github.com/mikel/mail/blob/7b3e100f42f2d7738c3af7bf1909777568270b67/lib/mail/network/delivery_methods/smtp.rb#L91
Rails does not appear to set them by default:
rails/actionmailer/lib/action_mailer/delivery_methods.rb
Lines 20 to 27 in a090847
nor does it appear to document how to set timeouts in the SMTP configuration section:
https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
Would a read/open timeout of 5 seconds be reasonable to use as a default going forward? Could we update the ActionMailer guide for 6.1 so people know how to configure the timeouts?
The text was updated successfully, but these errors were encountered: