Test emails work part of the time


(Tim Meade) #1

This is a newer installation. But we have quite a back log of email messages. When i hit the try the test email button, it will work two or three times easily and then stop for 4 or 5 minutes. Then work again. Its our SMTP server it’s pointed to so i can watch the logs, it really seems like the issue is with the discourse side.

Any ideas?

Much thanks.

Tim


(Jay Pfaffman) #2

When I was using my own mail server, I had problems with my server throttling because I’d failed to raise the incoming mail limit. Have you seen anything like that in your logs?


(Tim Meade) #3

no. It’s actually running on our hardware. I set up a straight test and sent 100 emails through in about 5 seconds. I’m redoing the app now with a FQDN instead of the ip in the yml file. I saw a post about that.


(Tim Meade) #4

FQDN made no difference. It looks like throttling, but unless it is on the discourse side, i’ve no idea. First three go through as fast as i can press the test button. Fourth one fails every time with a timeout.


(Jeff Atwood) #5

Is there anything in /logs in your browser when logged in as admin? You may also need to check the Rails logs in the parent container.


(Tim Meade) #6

in the container tailing log/production.log

Sent 3 or 4. All went except the last one.

Started GET "/" for 127.0.0.1 at 2016-05-08 11:20:09 +0000
Started GET "/" for 127.0.0.1 at 2016-05-08 11:20:18 +0000
Started POST "/admin/email/test" for 108.162.212.206 at 2016-05-08 11:20:19 +0000
Processing by Admin::EmailController#test as */*
  Parameters: {"email_address"=>"tim@XXXXXX.com"}

Sent mail to tim@XXXXXX.com (551.3ms)
  Rendered text template (0.0ms)
Completed 200 OK in 594ms (Views: 2.7ms | ActiveRecord: 14.6ms)
Started GET "/" for 127.0.0.1 at 2016-05-08 11:20:24 +0000
Started GET "/" for 127.0.0.1 at 2016-05-08 11:20:33 +0000
Started GET "/" for 127.0.0.1 at 2016-05-08 11:20:39 +0000
Started GET "/" for 108.162.215.59 at 2016-05-08 11:20:44 +0000
Started GET "/" for 127.0.0.1 at 2016-05-08 11:20:48 +0000
Started GET "/" for 127.0.0.1 at 2016-05-08 11:20:54 +0000
Started POST "/admin/email/test" for 108.162.210.84 at 2016-05-08 11:20:54 +0000
Processing by Admin::EmailController#test as */*
  Parameters: {"email_address"=>"tim@XXXXXX.com"}

Sent mail to tim@XXXXXX.com (512.4ms)
  Rendered text template (0.0ms)
Completed 200 OK in 545ms (Views: 0.3ms | ActiveRecord: 7.2ms)
Started POST "/admin/email/test" for 108.162.210.84 at 2016-05-08 11:20:56 +0000
Processing by Admin::EmailController#test as */*
  Parameters: {"email_address"=>"tim@XXXXXX.com"}

Sent mail to tim@XXXXXX.com (542.8ms)
  Rendered text template (0.0ms)
Completed 200 OK in 573ms (Views: 0.3ms | ActiveRecord: 7.5ms)
Started POST "/admin/email/test" for 108.162.210.84 at 2016-05-08 11:20:58 +0000
Processing by Admin::EmailController#test as */*
  Parameters: {"email_address"=>"tim@XXXXXX.com"}
Started GET "/" for 127.0.0.1 at 2016-05-08 11:21:03 +0000
Started GET "/" for 127.0.0.1 at 2016-05-08 11:21:09 +0000
Processing by CategoriesController#index as */*
  Rendered categories/index.html.erb within layouts/application (0.6ms)
  Rendered layouts/_head.html.erb (0.2ms)
  Rendered common/_special_font_face.html.erb (0.2ms)
  Rendered common/_discourse_stylesheet.html.erb (0.2ms)
  Rendered application/_header.html.erb (0.1ms)
  Rendered common/_discourse_javascript.html.erb (0.5ms)
Completed 200 OK in 148ms (Views: 4.5ms | ActiveRecord: 33.5ms)
Started GET "/" for 127.0.0.1 at 2016-05-08 11:21:18 +0000
Started GET "/" for 127.0.0.1 at 2016-05-08 11:21:24 +0000

## Sent mail to tim@XXXXXX.com (30004.7ms)
## Completed 422 Unprocessable Entity in 30025ms (Views: 0.2ms | ActiveRecord: 0.0ms)
Started GET "/" for 127.0.0.1 at 2016-05-08 11:21:33 +0000
Started GET "/" for 127.0.0.1 at 2016-05-08 11:21:39 +0000
Started GET "/" for 127.0.0.1 at 2016-05-08 11:21:48 +0000

(Michał Frąckiewicz) #7

To be on the safe side, try SMTP as a service like mailgun.com to send dozen of test emails to eliminate problems with your server.