【发布时间】:2012-06-17 12:12:51
【问题描述】:
我平均每封电子邮件大约 2000 毫秒。 这正常吗?你能举一些你的应用程序中的例子吗?电子邮件可以正常发送。我知道我可能应该使用 DelayedJob 或 SendGrid 之类的 SMTP 中继,但我猜它的时间太长了,而且存在潜在问题。
2012-06-13T21:28:55+00:00 app web.1 - - Sent mail to ... (7856ms)
2012-06-13T21:28:57+00:00 app web.1 - - Sent mail to ... (2003ms)
2012-06-13T22:24:42+00:00 app web.1 - - Sent mail to ... (3094ms)
2012-06-13T22:24:43+00:00 app web.1 - - Sent mail to ... (1722ms)
2012-06-14T02:20:37+00:00 app web.1 - - Sent mail to ... (5932ms)
2012-06-14T02:22:16+00:00 app web.1 - - Sent mail to ... (1830ms)
2012-06-14T02:22:18+00:00 app web.1 - - Sent mail to ... (1740ms)
如果没有,我该如何调试需要这么长时间的东西?
(顺便说一句,logentries 为收集这些数据而震惊)
我的 SMTP 设置:
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "example.com",
:authentication => "plain",
:user_name => "mail@example.com",
:password => "...",
:enable_starttls_auto => true
}
【问题讨论】:
标签: ruby-on-rails-3 heroku smtp actionmailer google-apps