Net::SMTPServerBusy causes Sidekiq to DOS instances and take down site

(Jordon Bedwell) #1

Recently we moved to Amazon SES and forgot to get a rate limit increase for, before noticing that we forgot to get this increase we ended up being DOS’d by Discourse because of Net::SMTPServerBusy rate limiting and Discourse checking and queing thousands of emails over and over again which resulted in a consumption of 100% CPU (which ultimately got fixed temporarily by us doing a CPU limit on the Sidekiq PiD’s from outside of Docker.)

It would be great if Discourse could handle Net::SMTPServerBusy and try again in an hour (rather than seconds – which in the grand scheme of thousands of emails is over and over again.) This way it can try again with a clean slate and if there could be an option for users to set the maximum emails per second that their server is willing to accept so that Discourse can throttle itself and divvy up it’s Sidekiq queues by that limit.

(Jeff Atwood) #2

Sure @zogstrip can you look into this?

1 Like
(Régis Hanol) #3

Just added support for Net::SMTPServerBusy :e-mail:

(Jeff Atwood) closed #4

This topic was automatically closed after 3 days. New replies are no longer allowed.