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

Sending email may cause issues with SparkPost Slow responding #82

Open
svpernova09 opened this issue Jun 9, 2016 · 1 comment
Open

Comments

@svpernova09
Copy link
Contributor

svpernova09 commented Jun 9, 2016

Convo from IRC this morning:

09:18 <Lamarus> is there something going on with the site?   I have been getting the same message over and over this morning.   https://cloudup.com/cWz3HtrfQo6
09:18 <Phergie> [http://u.gsc.io/16] Cloudup
09:20 <gchristensen> yikes...
09:20 <gchristensen> mfrost503_: are you doing phpmentoring dev? seems there is some spam or something.
09:21 <mfrost503_> gchristensen: is it coming from me? I haven't worked on phpmentoring stuff in a long time, like 2 years
09:22 <joepferguson> gchristensen: dragonmantank is leading that charge
09:22 <joepferguson> Lamarus: I haven't been getting that, but dragonmantank would be the one to debug
09:22 <joepferguson> afaik
09:23 <Lamarus> no problem.. i didnt know if there was an error coming up when someone sends a message or something like that
09:23 <Lamarus> error but still sending...
09:25 <joepferguson> Hrm checking our mail processor
09:25 <jonny> Assuming somebody isn't just spamming you.
09:25 <Lamarus> I dont think they are.. it was a legit request for help (i think)
09:26 <Lamarus> mail is taking forever to send after I hit "submit"
09:26 <jonny> With a subject of "sick hair cut"? :P
09:26 <Lamarus> ya... I just got a 504 when submitting the message back
09:27 <joepferguson> Hrm, everything looks good on spark post
09:27 <Lamarus> jonny ya.. i thought it was spam at first because of that... but it is my "cousin it" haircut
09:27 <Lamarus> joepferguson odd.... it does go to a 504 page when I submit a message
09:28 <Lamarus> hmm.. i just replied to yours just fine
09:28 <joepferguson> Odd..
09:28 <joepferguson> Maybe just slow response from SparkPost's api
09:29 <joepferguson> I bet we're not queueing the email
09:29 <Lamarus> it seems that way

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?

@dragonmantank
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants