Emails Suddenly Delayed in Sidekiq

AI-generated summary

The discussion revolves around sudden email delays and duplicates in a Discourse instance using Sidekiq. JamesNorth reports 12-24 hour delays and duplicate emails, with Sidekiq showing Net::ReadTimeout errors, despite successful email delivery and no authentication issues. The SMTP service works fine with other applications on the same machine. rgaufman confirms similar issues, noting multiple email copies for long-running jobs, also accompanied by Net::ReadTimeout errors, and asks if a solution was found.

Hi All,

I’ve noticed that suddenly I’m getting delays of 12-24 hours on emails and also duplicate emails being sent from one of my Discourse installs.

I update this particular Discourse instance once a week or so and it has been running flawlessly for a couple of years now.

All of my authentication settings look fine in my aml file and when I log into my SMTP transaction service all I see I perfect reception of emails at the delayed time (and the duplicates). No auth errors or anything else.

In Sidekiq I see this:

Jobs::HandledExceptionWrapper: Wrapped Net::ReadTimeout: Net::ReadTimeout with #<TCPSocket:(closed)>

Which seems to indicate some kind of connection issue … which I can’t see any other indication of other than Sidekiq.

This SMTP service is also perfectly working from the same machine with another instance of Discourse (same version) and a few Wordpress installs.

Has anything changed recently in AML file handling for emails … or can anyone offer any pointers on how to diagnose something like this?

Thanks heaps!

Did you ever find a solution for this? - I’m getting “Net::ReadTimeout with #Socket:(closed)” exceptions despite the emails being successfully sent, so I’m getting 10-20 copies of the email. This only happens for email jobs that take a long time to execute to collect the data.