Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry mailer tasks on SMTP failure #3823

Merged
merged 1 commit into from Sep 2, 2016
Merged

Conversation

nickstenning
Copy link
Contributor

We are seeing evidence that occasionally the Mandrill SMTP server disconnects our mailer, or perhaps that the network between our application and Mandrill occasionally drops:

https://sentry.io/hypothesis/prod/issues/152186124/

This commit adds retry logic to the mailer task to ensure that in the event of any kind of network or SMTP error, the task is requeued for another delivery attempt later.

With the current configuration we will attempt to deliver mail four times (i.e. 3 retries) over a period of approximately 20 minutes, using an exponential backoff.

We are seeing evidence that occasionally the Mandrill SMTP server
disconnects our mailer, or perhaps that the network between our
application and Mandrill occasionally drops:

  https://sentry.io/hypothesis/prod/issues/152186124/

This commit adds retry logic to the mailer task to ensure that in the
event of any kind of network or SMTP error, the task is requeued for
another delivery attempt later.

With the current configuration we will attempt to deliver mail four
times (i.e. 3 retries) over a period of approximately 20 minutes, using
an exponential backoff.
@codecov-io
Copy link

Current coverage is 77.60% (diff: 100%)

Merging #3823 into master will increase coverage by 0.02%

@@             master      #3823   diff @@
==========================================
  Files           150        150          
  Lines          5562       5568     +6   
  Methods           0          0          
  Messages          0          0          
  Branches        618        618          
==========================================
+ Hits           4315       4321     +6   
+ Misses         1175       1173     -2   
- Partials         72         74     +2   

Sunburst

Powered by Codecov. Last update d11a7c6...c13531b

@robertknight
Copy link
Member

LGTM

@robertknight robertknight merged commit b18a5a5 into master Sep 2, 2016
@robertknight robertknight deleted the retry-on-smtp-errors branch September 2, 2016 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants