Open svpernova09 opened 8 years ago
The app currently doesn't use a queue to send the e-mail messages, it's doing it through straight SMTP through SwiftMailer.
My guess is that CloudFlare is throwing the 504 as it's sitting in front of the website, and the SMTP connection is taking just long enough sometimes to cause CloudFlare to think we've timed out. Since the process isn't actually dying the message is still sent (I've had this same thing happen on some providers like Rackspace CloudSites).
Short of setting up a queue and workers to process the e-mails, I'll see if there is anything to tweak. I think SparkPost has an API but that will take some work on the app to get it off of straight SMTP.
Convo from IRC this morning:
We couldn't replicate it, but it's possibly caused by slow responses from SparkPost's API. Are we using any queue that we can drop the mail on instead of waiting for success from the API?